Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bart Grijseels 4 posts 24 karma points
    Oct 05, 2011 @ 13:13
    Bart Grijseels
    0

    Razor vs Response times

     

    Hi all,

     

    I'm currently running an umbraco v 4.7.0 website using razor.

    The initial page call after an app recycle for different types of pages (homepage / list overview / detail pages ) varies from 3 -> 8 ! seconds when nothing is cached (umbraco macro caching). The second call goes much smoother with a response time of minus 1 second. 

    Is this response time a known issue when using razor ? It seems like loading a macro is acting very slow ? 

     

    Since this website is deployed on a shared hosting, the app pool is recycled on a regular base. I'm not allowed to change this config or configure asp.net 4.0 prewarm triggers. 

    Using a ping service is could avoid the app pool to recycle but I would prefer fixing this problem without relying on a thirdparty service.

     

    Render time without cache (from tracing):

    renderMacro Rendering started (macro: Top Banner, type: 6, cacheRate: 500000) 1,40895588685154 0,029033

    umbracoMacro MacroEngine script added (TopBanner.cshtml) 1,411046655371 0,002091

    umbracoMacro Loading IMacroEngine script 1,41295388101002 0,001907

    umbracoMacro Loading IMacroEngine script [done] 2,50642078811693 1,093467

    renderMacro Rendering started (macro: Top Navi, type: 6, cacheRate: 500000) 2,50835203915581 0,001931

    umbracoMacro MacroEngine script added (TopNavi.cshtml) 2,50842467408567 0,000073

    umbracoMacro Loading IMacroEngine script 2,50844953758089 0,000025

    umbracoMacro Loading IMacroEngine script [done] 2,69173763704605 0,183288

     

    Render time with cache (from tracing):

    renderMacro Rendering started (macro: Top Banner, type: 6, cacheRate: 500000) 0,00280789876925699 0,000031

    renderMacro Macro Control loaded from cache ('1052-TopBanner-')... 0,00284086385280811 0,000033

    umbracoMacro Macro loaded from cache (ID: 2, Top Navi) 0,00289645751066127 0,000056

    renderMacro Rendering started (macro: Top Navi, type: 6, cacheRate: 500000) 0,00294031783369115 0,000044

    renderMacro Macro Control loaded from cache ('1052-TopNavi-')... 0,0029713273614384 0,000031

     

    Code sample Top banners:

    @using umbraco.MacroEngines;

    @using umbraco.cms.businesslogic.media;

    @inherits umbraco.MacroEngines.DynamicNodeContext

    @if (Model.HasProperty("banner") && Model.Media("banner") != null)

    {

        var image = @Model.Media("banner");

        <img src='@image.UmbracoFile' alt='@image.Name' />

    }

    else

    {

        Media startMedia = new Media(1060);

        Media randomItem  = startMedia.Children.OrderBy(T => Guid.NewGuid()).FirstOrDefault();

        if (randomItem != null)

        {       

            <img src='@randomItem.getProperty("umbracoFile").Value'  />

        }

    }

     

     

    Thanks in advance,

    Bart

     

  • Stefan Kip 1606 posts 4098 karma points c-trib
    Oct 05, 2011 @ 14:10
    Stefan Kip
    0

    I don't think this got anything to do with razor.

    The problem is the app pool, which get's recycled. Cold 'boot' time varying from 3 - 8 seconds sounds kind of fast to me...

  • Bart Grijseels 4 posts 24 karma points
    Oct 05, 2011 @ 14:31
    Bart Grijseels
    0

    Small remark: 
    This load time happens for each page.
    It is not the normal application startup delay on first request inside the app pool.

    Regards,
    Bart 

  • David Smit 1 post 21 karma points
    Dec 06, 2012 @ 16:32
    David Smit
    0

    Hi Bart

    Did you find a solution for this? All my pages are also slow after app pool recycle.

    Regards

    David

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies