Copied to clipboard

Flag this post as spam?

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


  • Dempsey 11 posts 91 karma points
    Jul 03, 2018 @ 14:22
    Dempsey
    0

    Bulk imports getting slower per item because of EnsureUniqueNodeName

    Hello,

    We are migrating an existing database to Umbraco. We haven written custom importers for this process. Whilst importing, we noticed that every record being imported became slower and slower.

    After further analyzation, we found that on every save, the function EnsureUniqueNodeName in the ContentRepository gets called, which in turn calls a query to get all nodenames under a specific parent. This is of course necessary, but the method itself is implemented very sloppily, which leads to a serious performance loss.

    It always selects the entire list of content items under that parent, and works further on that list. We think this method could be made way more performant.

    When inserting 20k records, we are talking about a delay of +-130ms for this query, whilst all the other statements execute in max. 5ms.

    Is there a way to optimize this in any way? I already added some indexes to the tables, but to no avail.

    Kind regards

Please Sign in or register to post replies

Write your reply to:

Draft