Copied to clipboard

Flag this post as spam?

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


  • Kasper Bumbech 30 posts 50 karma points
    Apr 30, 2018 @ 11:33
    Kasper Bumbech
    0

    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

     ....
     @Html.Partial("/Views/Partials/View - Copy (1).cshtml")
     @Html.Partial("/Views/Partials/View - Copy (2).cshtml")
     @Html.Partial("/Views/Partials/View - Copy (3).cshtml")
     @Html.Partial("/Views/Partials/View - Copy (4).cshtml")
     .... and more up to 20
    

    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.

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 01, 2018 @ 06:25
    Dave Woestenborghs
    0

    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

  • Kasper Bumbech 30 posts 50 karma points
    May 01, 2018 @ 12:17
  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    May 02, 2018 @ 06:25
    Dave Woestenborghs
    0

    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

  • Kasper Bumbech 30 posts 50 karma points
    May 02, 2018 @ 09:24
    Kasper Bumbech
    0

    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).

  • Kasper Bumbech 30 posts 50 karma points
    May 02, 2018 @ 09:33
    Kasper Bumbech
    0

    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)enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft