Copied to clipboard

Flag this post as spam?

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


  • Simon Dingley 1474 posts 3431 karma points c-trib
    Jun 29, 2016 @ 10:50
    Simon Dingley
    0

    Content Selection Performance Issues

    I have a partial view that lists news items paged 10 at a time. there is just short of 1000 news nodes in the site in question and the following query for content takes in excess of 16 seconds to complete and once you add in the additional filters and content rendering afterwards the page load times are starting to creep sometimes up to 40 seconds which for obvious reasons is unacceptable:

    IEnumerable<IPublishedContent> newsItems = Model.Children.Where(n => n.DocumentTypeAlias == "NewsArticle" && n.IsVisible());
    

    Any ideas why this might be? The blog is an almost identical area of the site but only has 100 posts and also suffers similar issues.

    I feel that my only way out at the moment is to fall back to using Examine and make searchable paths in the Examine index so that I can query for all children of a particular news node. Not necessarily a bad thing but I would prefer to get to the bottom of this.

    Umbraco 7.4.3

    Also related/contributing to slow page load times is this issue:

    Cheers, Simon

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Jun 29, 2016 @ 11:35
    Simon Dingley
    0

    As a test I have gone down the route of trying my luck with Examine yet even with the following and only the following code I am seeing 5 second load times just for the NewsList partial which is just too slow and not normal behaviour:

    var searcher = ExamineManager.Instance.SearchProviderCollection["SiteSearchSearcher"];
    var criteria = searcher.CreateSearchCriteria(UmbracoExamine.IndexTypes.Content);
    IBooleanOperation filter = criteria.NodeTypeAlias("NewsArticle");
    
    filter.Not().Field("umbracoNaviHide", "1");
    filter.And().ParentId(Model.Id);
    
    IEnumerable<IPublishedContent> newsItems = Umbraco.TypedSearch(filter.Compile());
    

    And here is a snapshot of the profiler:

    enter image description here

    Unsure of where else to start digging right now - perhaps I've been looking so long I'm missing something really obvious here?

Please Sign in or register to post replies

Write your reply to:

Draft