Tree View Performance

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone advise me on how well the windows .net tree view control performs
when loaded with large numbers of nodes.
I'm intersted in how it might perform when used with possibly millions of
nodes.
At what point will the control be 'over-stressed'?
 
Kevin -

I have a number of comments on this topic, having asked the same question
myself on several different occasions.

First of all the clear answer is NO. You would never want to load that many
nodes into the tree control. I remember clearly back in VB6 land that the
tree control would bog down after only adding several thousand nodes. I
think it's a bit better in .NET, but not much.

There are a couple of third party controls out there that are much better
designed to handle hundreds of thousands of nodes much faster.

BUT... all that having been said, I would turn this around on you, (as I did
to myself) and ask the question, "What are you thinking????" A MILLION
nodes? What kind of application requires the display of so many nodes at
once, and even if you could, do you really want your user having to go
through that many nodes to get where he or she wants?

Which direction are the millions of nodes? Is there a million nodes under
the root (vertical build) or does each node have ten nodes that has ten nodes
that has ten nodes, etc... (horizontal build)?

If it is a vertical build, I don't think a tree node is the right tool. If
it is a horizontal build, then I would recommend the solution I ended up
using and that is to only fetch the child nodes when the branch is
expanded... That way you are not wasting all those resources for all the
millions of nodes that will never get looked at.

Hope this helps! Good luck from a guy that's "been there, done that."

-Zorpy
 
Zorpiedoman,
Thanks for your reply and good advice.
I will have to reconsider the presentation of my data.

Kevin
 
Back
Top