I have an Umbraco V4 website that has a fly-out menu created using XSLT, the user wanted the menu to go down to 5 levels within the site but with the amount of pages they have it is making the website go slow even if I reduce it down to 4 levels. I have therefore had to reduce it down to 3 levels but I was just wondering if anything can be done to improve the efficiency of my XSLT or is it just the fact that this is going to be a problem having lots of pages and a menu that shows more than 3 levels? This is the XSLT I currently have which is based on the sitemap template:
<xsl:param name="currentPage"/> <!-- update this variable on how deep your site map should be --> <xsl:variable name="maxLevelForSitemap" select="3"/>
Hows about enabling caching on the macro? This should make it very quick, and is enabled through the macro tree in the developer section. Setting a fairly long cache time should help, and the main navigation is unlikely to change on an gourly basis.
I did try this but it still seemed to be quite slow, the menu is using jquery so I'm wondering if that is something to do with it, I might try disabling it so that it uses just CSS to see if it makes a difference.
Pages loading slow because of XSLT menu
Hi All,
I have an Umbraco V4 website that has a fly-out menu created using XSLT, the user wanted the menu to go down to 5 levels within the site but with the amount of pages they have it is making the website go slow even if I reduce it down to 4 levels. I have therefore had to reduce it down to 3 levels but I was just wondering if anything can be done to improve the efficiency of my XSLT or is it just the fact that this is going to be a problem having lots of pages and a menu that shows more than 3 levels? This is the XSLT I currently have which is based on the sitemap template:
Hows about enabling caching on the macro? This should make it very quick, and is enabled through the macro tree in the developer section. Setting a fairly long cache time should help, and the main navigation is unlikely to change on an gourly basis.
Dan
Hi Dan,
Do I want to enable cache by page or cache personalised? Also what sort of time should I be setting the cache period? Minutes, hours, days?
Cache by page I'd say, and if your nav will only be updated every couple of days, I'd cache it for 24 hours.
You will need to prepare for the call from a client saying "I added a page and it's not showing!"
Thanks Dan,
I did try this but it still seemed to be quite slow, the menu is using jquery so I'm wondering if that is something to do with it, I might try disabling it so that it uses just CSS to see if it makes a difference.
is working on a reply...