Is it a V3 site? Earlier versions have had some performance issues with the GetMedia extension method. It seemed to do a lot of DB lookups. This should be better in the new V4.
Thats a nice looking site! One question take it for publications you have content pages and they reference the publication media item? And you macro is listing the content pages then eventually you can get to pdf?
It may be that the macro doing the listing can be optimised?
Yes sort of. The publications are listed under Select, Develop and Engage sections within the site. Because a publication can exist 1, 2 or all of these I have used media types to stop duplication. I have set up a specific media type which has fields like, body copy, title, author, short desceription, publication date etc.
In heindsight I could have done a work around using a page and then where it was repeated just have a skeleton page pulling the data from the main page. That would have had other issues though I'm sure.
When you talk about optimising the macro how do you mean. Write better XLS / C# or are these some umbraco specific tips?
The caching is helping but if you have any more pointers then that would be very helpful. The XLTS below produces the content list on this page: http://www.talentlens.co.uk/select.aspx
You're making a LOT of calls to GetMedia, which is a slow call. Anything you can do to eliminate such calls will help. Here's one example:
You currently have this code:[code]<>
src="{umbraco.library:GetMedia(data [@alias = 'SmallImage']/text(), 'false')/data [@alias = 'umbracoFile']}"
width="{umbraco.library:GetMedia(data [@alias = 'SmallImage']/text(), 'false')/data [@alias = 'umbracoWidth']}"
height="{umbraco.library:GetMedia(data [@alias = 'SmallImage']/text(), 'false')/data [@alias = 'umbracoHeight']}"
alt="{umbraco.library:GetMedia(data [@alias = 'SmallImage']/text(), 'false')/data [@alias = 'AltText']}"
/>[/code]
You could change this to something like the following, which would save you 3 call for every image:[code]
<>
src="{$smImg/data [@alias = 'umbracoFile']}"
width="{$smImg/data [@alias = 'umbracoWidth']}"
height="{$smImg/data [@alias = 'umbracoHeight']}"
alt="{$smImg/data [@alias = 'AltText']}"
/>[/code]
Slow looping through media types
I have a site which contains a list of publications. Due to the way these publications need to appear I have set each one up as a media type.
These media types are often read and ordered or appear within containing pages.
I have noticed that the pages which read these media types, especially listing and ordering them, take far longer to render than other pages.
The 2 questions are:
1. Is this what you would usually expect to happen?
2. Is there a way to speed this up?
The site is here:
http://www.talentlens.co.uk/develop.aspx
Regards
Billy
Is it a V3 site? Earlier versions have had some performance issues with the GetMedia extension method. It seemed to do a lot of DB lookups. This should be better in the new V4.
Maybe you could try adding caching to your macro?
Many thanks.
I have changed the Macro Cache and it seems better. It is a version 4 site.
I have the settings as follows:
Cache Period: 3600 seconds
Cache by page: Yes
Cache Personalized: no
Does that seem about right?
Thats a nice looking site! One question take it for publications you have content pages and they reference the publication media item? And you macro is listing the content pages then eventually you can get to pdf?
It may be that the macro doing the listing can be optimised?
Regards
Ismail
Thanks for the feedback.
Yes sort of. The publications are listed under Select, Develop and Engage sections within the site. Because a publication can exist 1, 2 or all of these I have used media types to stop duplication. I have set up a specific media type which has fields like, body copy, title, author, short desceription, publication date etc.
In heindsight I could have done a work around using a page and then where it was repeated just have a skeleton page pulling the data from the main page. That would have had other issues though I'm sure.
When you talk about optimising the macro how do you mean. Write better XLS / C# or are these some umbraco specific tips?
Regards
Billy
billy,
If you can paste the xslt we may be able to give you some pointers.
Regards
Ismail
Hi Ismail
The caching is helping but if you have any more pointers then that would be very helpful. The XLTS below produces the content list on this page:
http://www.talentlens.co.uk/select.aspx
Alphabetical
Most recent
Most popular
Back to top
You're making a LOT of calls to GetMedia, which is a slow call. Anything you can do to eliminate such calls will help. Here's one example:
You currently have this code:[code]<>
src="{umbraco.library:GetMedia(data [@alias = 'SmallImage']/text(), 'false')/data [@alias = 'umbracoFile']}"
width="{umbraco.library:GetMedia(data [@alias = 'SmallImage']/text(), 'false')/data [@alias = 'umbracoWidth']}"
height="{umbraco.library:GetMedia(data [@alias = 'SmallImage']/text(), 'false')/data [@alias = 'umbracoHeight']}"
alt="{umbraco.library:GetMedia(data [@alias = 'SmallImage']/text(), 'false')/data [@alias = 'AltText']}"
/>[/code]
You could change this to something like the following, which would save you 3 call for every image:[code]
<>
src="{$smImg/data [@alias = 'umbracoFile']}"
width="{$smImg/data [@alias = 'umbracoWidth']}"
height="{$smImg/data [@alias = 'umbracoHeight']}"
alt="{$smImg/data [@alias = 'AltText']}"
/>[/code]
cheers,
doug.
That makes a lot of sense thank you.
The more I use Umbraco the more I like it. We are now on our third site build.
is working on a reply...