Intitial load/rendering of partials has performance degraded compared to "standard" asp.net mvc project.
After toying for some time with slow startup on different Umbraco sites, it seems to be narrowed down to the initial rendering/compile of partials.
The result is that adding different empty partial views to an exisiting razor/cshtml template adds at least a full second to the initial load time pr. partial (adding the same partial multiple times only carries the toll once).
Im aware of the compile that goes on - but when comparing to a "normal" asp.net mvc solution where the overhead is a few milliseconds, the overhead with Umbraco installed is 1 second (and then some) pr. partial.
This has been tested on the latest version of Umbraco (7.10) aswell as a 7.4 and 7.3.8 (clean install using Nuget).
For me - its more an issue with being able to have a proper development workflow (ie. if the site needs an additional 40 seconds on startup after a webdeploy does not bother me much)
But if a compile on the local dev enironment on avg. requires 40 additional seconds (note only when working with Umbraco solutions) - the quick math is that 10 compiles an hour adds up to 50 minutes of wasted "waiting for slow partial view render" per day and thats a recipe for recommending a change of webcms or quitting your job. (both are not really what I want anyone in my organization to do).
Intitial load/rendering of partials has performance degraded compared to "standard" asp.net mvc project.
After toying for some time with slow startup on different Umbraco sites, it seems to be narrowed down to the initial rendering/compile of partials.
The result is that adding different empty partial views to an exisiting razor/cshtml template adds at least a full second to the initial load time pr. partial (adding the same partial multiple times only carries the toll once).
Im aware of the compile that goes on - but when comparing to a "normal" asp.net mvc solution where the overhead is a few milliseconds, the overhead with Umbraco installed is 1 second (and then some) pr. partial.
This has been tested on the latest version of Umbraco (7.10) aswell as a 7.4 and 7.3.8 (clean install using Nuget).
I found this thread - https://our.umbraco.org/forum/using-umbraco-and-getting-started/79800-why-may-partial-view-performance-be-so-slow which seems to pinpoint the same behavior but its un-resolved.
Do anyone have a workaround for this or is it download source and fix?
Steps to reproduce where the problem is pin-pointed and is narrowed down to "just" the load of partials.
Create a clean asp.net mvc app in Visual studio.
Compile and load up the default homepage.
Add 10+ partial views (empty) in visual studio
Include these in the _layout.cshtml code
Reload the homepage - this adds a few hundred milliseconds on the intial load.
Then install Umbraco from Nuget - walk through the installler - after this load up the homepage
After the initial load add the partials to the "master.cshtml" (equivalent to _layout.cshtml).
Reload the homepage - now this adds around a second pr. partial - ~20 secs with 17 partials in my case.
Hi Kasper,
This worries me as well. I know Umbraco has some custom view enginges. So maybe this can be the cause.
Can you raise an issue on http://issues.umbraco.org/
Will try to have a look then.
Dave
Hi Dave,
http://issues.umbraco.org/issue/U4-11294
Kasper
Hi Kasper,
I've been digging in to this but can't find the culprit. Do you have the clean asp.net mvc application availabe to do some comparision ?
Meanwhile you could precompile your views. That will speed things up a lot on the first view.
My colleague Anton blogged about that : https://colours.nl/blog/road-to-precompiled-web-application-based-on-umbraco-cms
Dave
For me - its more an issue with being able to have a proper development workflow (ie. if the site needs an additional 40 seconds on startup after a webdeploy does not bother me much)
But if a compile on the local dev enironment on avg. requires 40 additional seconds (note only when working with Umbraco solutions) - the quick math is that 10 compiles an hour adds up to 50 minutes of wasted "waiting for slow partial view render" per day and thats a recipe for recommending a change of webcms or quitting your job. (both are not really what I want anyone in my organization to do).
Nb. from : http://issues.umbraco.org/issue/U4-11294 I gather that you were able to reproduce the issue.
The clean asp.net mvc project Im referencing is just an "ASP.NET Web Application" where you select "MVC" in Visual Studio. (see attached)
is working on a reply...