umbraco performance Options
jHodgkinson
Posted: Thursday, August 21, 2008 10:03:13 PM
Rank: Fanatic

Joined: 3/15/2007
Posts: 378
Location: Cary, NC USA
I'm seeing a big difference in page response times between sites with 50-100 nodes/pages vs sites with thousands of nodes/pages. Can anything be done on larger node sites to speed things up?
kalpa
Posted: Friday, August 22, 2008 9:01:59 AM

Rank: Fanatic

Joined: 7/19/2006
Posts: 496
Location: Göteborg, Sweden
Can you spot any memory issues on the server? More nodes creates a larger cache and therefore needs more RAM...

//;) Kalle

" - Yeah I'd like to share your point of view, as long as it's my view too... (http://www.d-a-d.dk/lyrics/pointofview)
jHodgkinson
Posted: Friday, August 22, 2008 3:01:16 PM
Rank: Fanatic

Joined: 3/15/2007
Posts: 378
Location: Cary, NC USA
kalpa wrote:
Can you spot any memory issues on the server? More nodes creates a larger cache and therefore needs more RAM...

//;) Kalle


thanks for the feedback kalpa - after further digging around I was able to determine to the memory issue is related to multiple navigation menus and their macro cache settings... we have a single global template that all sites use which includes the menu macro and each site should only render it's own menu. if I cache the macro on a page level (only Cache By Page checked), each page on the site has to be loaded at least once before the macro is cache. if I cache across the board (neither Cache By Page or Cache By personalized checked) then the macro is cached but is cached across all sites whereas I want it to be cache site specific. What is the best way to deal with this? if I pass some type of site specific parameter through the macro would that make the caching unique to the macro call? any idea? many thanks!
jHodgkinson
Posted: Friday, August 22, 2008 3:15:10 PM
Rank: Fanatic

Joined: 3/15/2007
Posts: 378
Location: Cary, NC USA
OK actually assigning each site it's own master template and then passing a unique "cache key" through the macro call appears to fixed it and it will now cache across each site successfully. thanks for the help kalpa!
jHodgkinson
Posted: Friday, August 22, 2008 3:26:36 PM
Rank: Fanatic

Joined: 3/15/2007
Posts: 378
Location: Cary, NC USA
actually I've run into an issue by creating individual master templates so I'm going to have to go back to the single master template approach. is there a property that I can use to pass the outmost parent node id for the site (i.e. homepage node id)?
hartvig
Posted: Friday, August 22, 2008 3:34:13 PM

Rank: Addict

Joined: 3/17/2008
Posts: 982
Location: Nyborg, Denmark
Is it a very complex nav? It shouldn't really be an issue to run these macros fast with <10k nodes. Umbraco 4 supports recursive macro parameters, unfortunately v3 doesn't.

Jeeeez, did I really start this :-)
jHodgkinson
Posted: Friday, August 22, 2008 3:38:41 PM
Rank: Fanatic

Joined: 3/15/2007
Posts: 378
Location: Cary, NC USA
hartvig wrote:
Is it a very complex nav? It shouldn't really be an issue to run these macros fast with <10k nodes. Umbraco 4 supports recursive macro parameters, unfortunately v3 doesn't.


Niels - I do have some lookups to exclude certain template types and get the fully qualified url, maybe that is causing a problem... below is the source xslt but if I could pass some type of homepage/site id/root domain value through the macro in the master template then I think that would fix it as well so I could cache it on a site/domain level:

Code:


<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp " "> ]> 
<xsl:stylesheet   
    version="1.0"   
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"   
    xmlns:msxml="urn:schemas-microsoft-com:xslt" 
    xmlns:umbraco.library="urn:umbraco.library" 
    xmlns:macroHelper="urn:macroHelper"
    xmlns:urlsHelper="urn:urlsHelper"
    exclude-result-prefixes="msxml urlsHelper umbraco.library"> 

<xsl:output method="xml" omit-xml-declaration="yes" />

<xsl:param name="currentPage"/>

<xsl:variable name="level" select="1"/>
<xsl:variable name="maxLevelForNavigation" select="5"/>

<xsl:template match="/">

<ul style="z-index:1000;" class="menulist" id="listMenuRoot">

<xsl:choose>

<xsl:when test="$currentPage/ancestor-or-self::node[@parentID = 1059] or $currentPage/@id = 1059">

<!-- 4ALL -->
<li><a href="{urlsHelper:NiceUrlFullyQualifiedPath(1059)}" title="Home">Home</a><ul>
<li class="left_border"><a title="Forget Password?" href="{urlsHelper:NiceUrlFullyQualifiedPath(1204)}">Forget Password?</a></li>
<li class="left_border"><a title="NCBA Login" href="{urlsHelper:NiceUrlFullyQualifiedPath(1196)}">NCBA Login</a></li>
<li class="left_border"><a title="Site Map" href="{urlsHelper:NiceUrlFullyQualifiedPath(1153)}">Site Map</a></li>
<li class="left_border"><a title="Site Search" href="{urlsHelper:NiceUrlFullyQualifiedPath(1154)}">Site Search</a></li>
</ul></li>

</xsl:when>

<xsl:when test="$currentPage/ancestor-or-self::node[@parentID = 1418] or $currentPage/@id = 1418">

<!-- MAIN NCBA -->
<li><a href="{urlsHelper:NiceUrlFullyQualifiedPath(1418)}" title="Home">Home</a><ul>
<li class="left_border"><a title="Forget Password?" href="{urlsHelper:NiceUrlFullyQualifiedPath(1442)}">Forget Password?</a></li>
<li class="left_border"><a title="NCBA Login" href="{urlsHelper:NiceUrlFullyQualifiedPath(1436)}">NCBA Login</a></li>
<li class="left_border"><a title="Site Map" href="{urlsHelper:NiceUrlFullyQualifiedPath(1438)}">Site Map</a></li>
<li class="left_border"><a title="Site Search" href="{urlsHelper:NiceUrlFullyQualifiedPath(1439)}">Site Search</a></li>
</ul></li>

</xsl:when>

<xsl:otherwise>

<!-- OTHER NCBA -->
<li><a href="{urlsHelper:NiceUrlFullyQualifiedPath($currentPage/@parentID)}" title="Home">Home</a></li>

</xsl:otherwise>

</xsl:choose>

    <xsl:call-template name="printListe">
        <xsl:with-param name="node" select="$currentPage/ancestor-or-self::node[@level = 1]"/>
    </xsl:call-template>
</ul>

</xsl:template>

<xsl:template name="printListe">

<xsl:param name="node"/>

<xsl:for-each select="$node/node [string(./data [@alias='umbracoNaviHide']) != '1' and @level &lt;= $maxLevelForNavigation]">

<xsl:sort select="number(@sortOrder)" data-type="number" order="ascending"/>

    <li class="left_border">

    <xsl:choose>
        <xsl:when test="count(./node[string(./data [@alias='umbracoNaviHide']) != '1']) &gt;= 1 and @level &gt; 2">

            <a href="{urlsHelper:NiceUrlFullyQualifiedPath(@id)}" title="{data[@alias='navTitle']}"><xsl:value-of select="data[@alias='navTitle']"/><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text></a>

        </xsl:when>

        <xsl:when test="./data [@alias = 'newWindow'] = '1' ">

           <a onclick="target='_blank'" onkeypress="target='_blank'" href="{urlsHelper:NiceUrlFullyQualifiedPath(@id)}" title="{data[@alias='navTitle']}"><xsl:value-of select="data[@alias='navTitle']"/></a>

        </xsl:when>

        <xsl:otherwise>

           <a href="{urlsHelper:NiceUrlFullyQualifiedPath(@id)}" title="{data[@alias='navTitle']}"><xsl:value-of select="data[@alias='navTitle']"/></a>           
          </xsl:otherwise>
    </xsl:choose>

    <xsl:if test="count(./node[string(./data [@alias='umbracoNaviHide']) != '1' and @level &lt;= $maxLevelForNavigation and macroHelper:GetTemplateName(@template) != 'template_news_item' and macroHelper:GetTemplateName(@template) != 'template_events_item' and macroHelper:GetTemplateName(@template) != 'template_faqs_item' and macroHelper:GetTemplateName(@template) != 'template_ncLawyer_item' and macroHelper:GetTemplateName(@template) != 'template_webzine_item' and macroHelper:GetTemplateName(@template) != 'template_links_item' and macroHelper:GetTemplateName(@template) != 'template_inMemorium_item' and macroHelper:GetTemplateName(@template) != 'template_programTestimonial_item']) &gt; 0">

    <xsl:variable name="zIndex" select="number(1000) - @level"/>

        <ul style="z-index: {$zIndex}">
            <xsl:call-template name="printListe">
                <xsl:with-param name="node" select="."/>
            </xsl:call-template>
        </ul>
    </xsl:if>

    </li>

</xsl:for-each>

</xsl:template>

</xsl:stylesheet>




jHodgkinson
Posted: Friday, August 22, 2008 6:41:17 PM
Rank: Fanatic

Joined: 3/15/2007
Posts: 378
Location: Cary, NC USA
ok - good tip Niels... the culprit was the get template name method I was calling to exclude certain types (not sure why I wrote it that way before)... I've switch everything to check the @nodeTypeAlias and everything is smoking fast now... thank goodness...
jHodgkinson
Posted: Friday, August 22, 2008 7:04:32 PM
Rank: Fanatic

Joined: 3/15/2007
Posts: 378
Location: Cary, NC USA
also in regards to the "Cache Period" property, what does a cached macro with a Cache Period set to "0" milliseconds do? is is still cached or is it an unlimited time limit (until next publish)?

many thanks!

Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.