Copied to clipboard

Flag this post as spam?

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


  • Dave Pearcey 46 posts 178 karma points
    Jul 26, 2017 @ 09:10
    Dave Pearcey
    0

    Umbraco server load time with azure

    Hey guys.

    We've recently gone live with our new site and I've been working on some performance enhancements. The only issue i have remaining is that there's a considerable wait time for a response from Azure.

    NET Panel

    All other assets are either cached or lazy loaded in.

    I know its not cold starting, theres never been fewer than 100 users online. Averages 350 at any given time and can spike above 1000 depending on articles being released.

    The set up is:

    • Azure Cloud
    • Load balanced across 4 servers
    • Azure blob CDN
    • Seperated database

    Some optimisations made:

    • Redis Output Caching
    • log4net set to errors only (Hard lesson, filling 5gb of logs within an hour)
    • cache control for css/js
    • macro's cached where needed
    • "/umbraco_client", "/umbraco/images" and "/umbraco/js" cached through IIS

    Those lists could probably go on a bit, but thats what i got from the top of my head.

    I'd just like to see a reduction in the server response!

    Thanks for input in advance.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 27, 2017 @ 11:06
    Alex Skrypnyk
    1

    Hi Dave

    Did you try to check your front page with miniProfiler? It will give you a picture of performance issues.

    What about a local version of the site? Do you have performance issues when you run the project locally?

    Is it an only Azure problem?

    Thanks,

    Alex

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 27, 2017 @ 11:09
    Alex Skrypnyk
    0

    What version of Umbraco are you using?

    Please check where Umbraco XML cache file stored?

    https://our.umbraco.org/documentation/getting-started/setup/server-setup/azure-web-apps#umbraco-xml-cache-file

  • Dave Pearcey 46 posts 178 karma points
    Jul 27, 2017 @ 11:54
    Dave Pearcey
    0

    Im using 7.6.4

    I changed where the XML cache is stored like that link suggested. made no difference, but no harm in it being there just in case!

    As for the mini profiler. Hadn't thought of using that so thanks! I checked it out locally and this is what im seeing:

    enter image description here

    Looks like my navigation partial is taking a hell of a long time... I don't see what could be causing a considerable load time for it though:

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    
    @{ var selection = CurrentPage.Site().Children.Where("Visible"); }
    
    <ul>
        <li id="store-link-mobile"><a href="https://store.soccerbible.com/" target="_blank">Store</a></li>
        @foreach (var item in selection)
        {
            var children = Umbraco.Content(item.id).Descendants().Where("NodeTypeAlias == @0 AND Visible", "newsArea");
            <li class="@(item.IsAncestorOrSelf(CurrentPage) ? "current" : null) @(children.Any() ? "has-children" : null)">
                <a href="@item.Url">@item.Name</a>
                @if (children.Any())
                {
                    <ul>
                        @foreach (var child in children)
                        {
                            <li class="@(child.IsAncestorOrSelf(CurrentPage) ? "current" : null)">
                                <a href="@child.Url">@child.Name</a>
                            </li>
                        }
                    </ul>
                }
            </li>
        }
    </ul>
    
  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 27, 2017 @ 12:03
    Alex Skrypnyk
    100

    Hi Dave

    Please follow "Umbraco Common Pitfalls & Anti-Patterns" article - https://our.umbraco.org/documentation/reference/Common-Pitfalls/

    The fastest way to fix performance - just cache navigation partial view with Html.CachedPartial - https://our.umbraco.org/documentation/reference/templating/mvc/partial-views#caching

    Avoid dynamics, descendants and too much querying.

    My version of your partial view - without dynamics and little bit optimised, if you will avoid "Descendants()" method it will be much faster, try to replace it with xPath:

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    
    @{ var selection = Umbraco.AssignedContentItem.Site().Children.Where("Visible"); }
    
    <ul>
        <li id="store-link-mobile"><a href="https://store.soccerbible.com/" target="_blank">Store</a></li>
        @foreach (var item in selection)
        {
            var children = item.Descendants().Where(x => x.IsVisible() && x.DocumentTypeAlias.Equals("newsArea"));
    
            <li class="@(item.IsAncestorOrSelf(Umbraco.AssignedContentItem) ? "current" : null) @(children.Any() ? "has-children" : null)">
                <a href="@item.Url">@item.Name</a>
                @if (children.Any())
                {
                    <ul>
                        @foreach (var child in children)
                        {
                            <li class="@(child.IsAncestorOrSelf(Umbraco.AssignedContentItem) ? "current" : null)">
                                <a href="@child.Url">@child.Name</a>
                            </li>
                        }
                    </ul>
                }
            </li>
        }
    </ul>
    

    Hope it will help,

    Thanks,

    Alex

  • Dave Pearcey 46 posts 178 karma points
    Jul 27, 2017 @ 12:01
    Dave Pearcey
    0

    changing Umbraco.Content(item.id).Descendants() to use children instead dropped that down to 30ms... ill just teach our content editors to not put a sub category under a folder or something stupid...

    Thanks for leading me towards that. im gonna see how much it affects the live page speeds now.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 27, 2017 @ 12:07
    Alex Skrypnyk
    0

    if it's just next level, use this code:

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    
    @{ var selection = Umbraco.AssignedContentItem.Site().Children.Where(x => x.IsVisible()); }
    
    <ul>
        <li id="store-link-mobile"><a href="https://store.soccerbible.com/" target="_blank">Store</a></li>
        @foreach (var item in selection)
        {
            var children = item.Children.Where(x => x.IsVisible() && x.DocumentTypeAlias.Equals("newsArea"));
    
            <li class="@(item.IsAncestorOrSelf(Umbraco.AssignedContentItem) ? "current" : null) @(children.Any() ? "has-children" : null)">
                <a href="@item.Url">@item.Name</a>
                @if (children.Any())
                {
                    <ul>
                        @foreach (var child in children)
                        {
                            <li class="@(child.IsAncestorOrSelf(Umbraco.AssignedContentItem) ? "current" : null)">
                                <a href="@child.Url">@child.Name</a>
                            </li>
                        }
                    </ul>
                }
            </li>
        }
    </ul>
    
  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 27, 2017 @ 12:08
    Alex Skrypnyk
    0

    By the way, really cool site - https://store.soccerbible.com/

    I'm soccer fan :)

  • Dave Pearcey 46 posts 178 karma points
    Jul 27, 2017 @ 12:20
    Dave Pearcey
    0

    thats just the store. the main site is http://www.soccerbible.com/

    Thanks for you input, ill make those changes aswell. i'll see if theres anywhere else i can make similar optimizations!

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 27, 2017 @ 12:26
    Alex Skrypnyk
    0

    http://www.soccerbible.com/ - cool

    Share with us, please, how will you succeed with the performance issue.

    Thanks,

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft