You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our project, we have a compound node contains more than 17000 nodes, when collapsing it, it takes about 30 seconds. After some investigation, the API expandCollapseUtilities.removeChildren is taking most of the time, it seems like the following code inside the For loop is pretty expensive:
......
var removedChild = child.remove();
if (root._private.data.collapsedChildren == null) {
root._private.data.collapsedChildren = removedChild;
}
else {
root._private.data.collapsedChildren = root._private.data.collapsedChildren.union(removedChild);
}
Instead of doing that, how about to move the code out of the loop and do something:
In our project, we have a compound node contains more than 17000 nodes, when collapsing it, it takes about 30 seconds. After some investigation, the API
expandCollapseUtilities.removeChildren
is taking most of the time, it seems like the following code inside the For loop is pretty expensive:Instead of doing that, how about to move the code out of the loop and do something:
This way needs much less time (drop to about 1 second) to run.
The text was updated successfully, but these errors were encountered: