Copied to clipboard

Flag this post as spam?

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


  • Frans van Ek 11 posts 42 karma points
    May 07, 2015 @ 12:58
    Frans van Ek
    0

    Html.RenderPartial in de master page slows the site down

    Hi,

    I've got a basic site (FANOE) up and running. the homepage does load in just over 1,5 secs. With debug and trace i found that the rendiging of the navigation takes up most of the time.

    RazorView.Render: ~/Views/Partials/MainNaviga... 1019.6 +79.3  
    RazorView.Render: ~/Views/Partials/BottomNavi... 402.2 +1100.3

    when disabling the  lines in the master page

    @{ Html.RenderPartial("MainNavigation"); } 

    @{ Html.RenderPartial("BottomNavigation"); }

    the site loads in 100ms. (0,1sec)

    When I create a macro for the same cshtml files and use this on a page, the site loads fast. so it isn't the content of the partialviews which slows the website down.

     

    Any idea's or suggestions for optimizing this?

     

    Thanks in advance.

     

    Regards,

     

    Frans

Please Sign in or register to post replies

Write your reply to:

Draft