Hello all,
I've got a UltraWinTree with about 3200 nodes in it. I need to hide some nodes if a condition is met. What I do is:
BeginUpdate();
Start recursion;
if (conditionMet){ ultraTreeNode.visible = false; }
End recursion;
EndUpdate();
What I've found is that it takes ~3.2 seconds to peform this operation if the tree is expanded and ~1.6 seconds if the tree is collapsed. The code has been optimized to set modify only the nodes that are necessary; if a node is hidden, I don't check its child nodes.
Am I doing something wrong, or is this performance typical? Thanks.
Well, if the tree is no bound, then I don't know why it would be so slow.
Can you reproduce the issue in a small sample project and post it here so we can take a look?
Hi Mike,
I'm filling it manually, if that makes a difference. I think the only property that I've set related to expansion is:
Override.ShowExpansionIndicator =
ShowExpansionIndicator.CheckOnDisplay;
Hi,
Is your tree bound to a data source? Or are you filling it manually?
If it's bound, then this makes sense, because the tree loads the data lazily. So looping through every node will force the child nodes to get loaded and loading data from the data source can slow things down (depending on the data source). If that's the case, then the delay would only happen the first time. The second time, the data would already be loaded.
In that case, what I would recommend is that you do not loop through the node. Instead, use the InitializeDataNode event to hide the nodes. That way, only nodes that are expanded will be processed, and you will avoid loading the hidden nodes unnecessarily.