Copied to clipboard

Flag this post as spam?

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


  • Janne Mårtensgård 11 posts 232 karma points
    Apr 29, 2016 @ 09:36
    Janne Mårtensgård
    0

    Umbraco ModelsBuilder and Azure – performance issues

    Hi all,

    Lately we've been involved in designing and building a couple of large(ish) sites that will be hosted on Azure. In one of the sites, we made extensive use of the fabulous new ModelsBuilder to get strongly typed models for our doctypes. However, when doing a test import of some 1000 nodes of mock data, we found that the solution while running OK on our local IIS slowed to a crawl in the Azure stage environment. Even importing ~250 nodes showed a significant slowdown, and this is a site which can easily encompass several thousand nodes in a few years.

    I tested creating an almost empty template, only including a line fetching a node the "classical" way:

    var viewmodel = Umbraco.TypedContentAtRoot().First().Children.Where(x => x.DocumentTypeAlias == "settings").First();
    

    But even this took several seconds to render.

    Refactoring the views and partial views to fetch properties via GetPropertyValue and then turning off the ModelsBuilder in web.config brought the render time of the start page from two minutes to ten seconds (still a bit slow, but that can be assuaged by caching).

    The Umbraco back end has felt snappy(ish) the entire time, which makes me suspect it has something to do with the way ModelsBuilder handles the Umbraco cache and how this is handled in an Azure environment. Note that my testing template did not use any model casting but was still slowed down immensely when ModelsBuilder was active.

    Has anyone else run into this? Any workarounds? We LOVE the ModelsBuilder otherwise and would very much want to be able to use it further.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 18, 2016 @ 22:05
    Alex Skrypnyk
    0

    Hi Janne,

    How is your perfoemance issue? Did you solve it?

    Today found another topic with similar problem - https://our.umbraco.org/forum/using-umbraco-and-getting-started/77898-umbracohelpertypedcontentatroot-extremely-slow-when-u-have-a-lot-of-child-nodes

    Looks like TypedContentAtRoot are really slow, do you have a lot of rootNodes? Can you avoid using root nodes?

    Thanks,

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft