By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,702 Members | 1,485 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,702 IT Pros & Developers. It's quick & easy.

Tree View Performance

P: n/a
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'?

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
Nov 21 '05 #2

P: n/a
Zorpiedoman,
Thanks for your reply and good advice.
I will have to reconsider the presentation of my data.

Kevin

"Zorpiedoman" wrote:
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

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.