Copied to clipboard

Flag this post as spam?

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


  • Nicholas Westby 2054 posts 7104 karma points c-trib
    Sep 01, 2016 @ 17:30
    Nicholas Westby
    0

    CPU/Network Saturated After Sorting Content Nodes?

    I sorted a few nodes (about 20) under my homepage node (using the right click, sort flyout) and the CPU/network has been maxed out for over half an hour:

    Task Manager

    Has anybody else experienced this? Is this how slow the sort feature usually works?

    I wonder if maybe Umbraco is doing something (e.g., Examine indexing) with all descendant nodes (rather than just all child nodes) and that may be what is taking so much time. Either that, or an infinite loop of some sort.

    Umbraco 7.4.3 (upgraded from Umbraco 6.1.6).

  • Nicholas Westby 2054 posts 7104 karma points c-trib
    Sep 01, 2016 @ 17:42
    Nicholas Westby
    100

    Mystery solved, I think. I ran into this out of memory exception just now before the sort finished:

    Out of Memory

    This occurred on a line that was inside of a function called by a ContentService.Saving event handler. This code appears to be creating child nodes under certain conditions. I'm thinking that this sort operation basically caused a publish operation on every content node, which triggered this event handler a bunch, which led to a ton of new content nodes and publish operations.

    That explains the network saturation and CPU being pegged.

  • Nicholas Westby 2054 posts 7104 karma points c-trib
    Sep 01, 2016 @ 18:02
    Nicholas Westby
    0

    After commenting out the event handler, sorting took about 10 seconds. Much faster.

  • Biagio Paruolo 1621 posts 1914 karma points c-trib
    Sep 02, 2016 @ 17:39
    Biagio Paruolo
    0

    It's a bug or some code optimization to do?

  • Nicholas Westby 2054 posts 7104 karma points c-trib
    Sep 02, 2016 @ 18:03
    Nicholas Westby
    0

    Probably a bit of both, but I didn't spend much time on it. I just commented out the event handler in question, as it was providing only a very minimal feature at an evidently great cost.

    On the one hand, I'm curious why a sort operation would trigger saving/saved events. On the other hand, even though that seems to occur, the real problem was the event handler code that was seemingly extremely inefficient.

    There is also the fact that Umbraco ran out of memory. This is probably an issue with how it manages publish operations and the XML cache (i.e., it didn't seem to be disposing of some large objects fast enough, which caused an out of memory exception).

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies