Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
Performance in UltraTree Outlook Mode
posted

I have an application which uses an UltraTree in Outlook mode which has worked well over the years however i am hitting some performance issues which I am trying to get to the bottom of.

It Outlook mode it appears that I have to add node using the parentNode.Add() method to get the column set created correctly for the new node which I do and then set a number fof attributes for the node (cell values etc).  I have traced the code and added timers to find what seems to be taking the time and have narrowed it down to a single line which sets

node.Override.ShowExpansionIndicator = ShowExpansionIndicator.CheckOnExpand;

For about 16K nodes this one line increases the time to display the tree from 6 seconds to over 20 seconds yet to me it shouldn't actually cause anything to happen?  I have the source code for the UltraTree but cannot see what is happening when this flag is set - does it trigger other events?  I have begin / End Update around the entire operation but that doesn't help.

I was hooping I could set the flag for the parent node and have it filter down but that doesn't work either.  Any suggestions most welcome.

I also find it odd that there does not appear to be a way to add a range of nodes in one go when working in Outlook mode - well you can but there doesn't appear to be a way to create all of the nodes, set their cell values and tags and then add to the parent node as the column set is not set for the new node until it is added to the parent (as far as I can tell).

Parents
No Data
Reply
  • 34730
    Offline posted

    Hello Chris,

    I have been investigating into the behavior you are seeing, and I believe a little more information is needed in this case to get to the bottom of the performance issue you are seeing. I have some questions for you below.

    1. At what point is this performance issue happening? It seems like it is in the population of the 16,000 nodes that you have mentioned, but I would just like to confirm.

    2. Are the 16,000 nodes all parent nodes or are they children of another parent node(s)?

    3. Are the 16,000 nodes being added dynamically, or is this performance issue happening right at the start / the initial population of the tree?

    With the above questions, I do still have a couple of recommendations for you on this, as the UltraTree.Nodes collection as well as the UltraTreeNode.Nodes collections do have an AddRange method, taking an UltraTreeNode[], and so it is certainly possible to add multiple nodes at the same time. Would just need to populate an UltraTreeNode[] first and then pass that to the AddRange method.

    Another thing I am seeing in this case is that it appears that you are potentially setting the ShowExpansionIndicator for each UltraTreeNode.Override and it is possible this could be creating a performance issue. This can be set on the tree itself instead by setting the UltraTree.Override.ShowExpansionIndicator property. This will filter down into each node.

    Please let me know if you have any other questions or concerns on this matter.

Children