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):
renderMacroRendering started (macro: Top Banner, type: 6, cacheRate: 500000)1,408955886851540,029033 umbracoMacroMacroEngine script added (TopBanner.cshtml)1,4110466553710,002091 umbracoMacroLoading IMacroEngine script1,412953881010020,001907 umbracoMacroLoading IMacroEngine script [done]2,506420788116931,093467 renderMacroRendering started (macro: Top Navi, type: 6, cacheRate: 500000)2,508352039155810,001931 umbracoMacroMacroEngine script added (TopNavi.cshtml)2,508424674085670,000073 umbracoMacroLoading IMacroEngine script2,508449537580890,000025 umbracoMacroLoading IMacroEngine script [done]2,691737637046050,183288
Render time with cache (from tracing):
renderMacroRendering started (macro: Top Banner, type: 6, cacheRate: 500000)0,002807898769256990,000031 renderMacroMacro Control loaded from cache ('1052-TopBanner-')...0,002840863852808110,000033 umbracoMacroMacro loaded from cache (ID: 2, Top Navi)0,002896457510661270,000056 renderMacroRendering started (macro: Top Navi, type: 6, cacheRate: 500000)0,002940317833691150,000044 renderMacroMacro Control loaded from cache ('1052-TopNavi-')...0,00297132736143840,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' /> } }
Razor vs Response time
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):
Render time with cache (from tracing):
Code sample Top banners:
Thanks in advance,
Bart
Comment author was deleted
Hi Bart,
Could you check if it's still the same if you upgrade to 4.7.1 ?
Also this post might be interesting: http://our.umbraco.org/forum/developers/razor/24853-Razor-Benchmarks-Interesting-Results
Hi Tim,
I update the website and noticed the same initial loadtimes...
Any feedback from the team ? For the moment I've scheduled a task to keep the application pool alive but not 100% happy with this workaround.
Regards,
Bart
FYI: The update killed the "terrabyte" cropper datatype so I had to rollback afterwards but at least we're sure the upgrade doesn't fix this issue.
is working on a reply...