tags:

views:

79

answers:

1

MSDN Says:

A tree-view control uses memory that is allocated from the heap of the process that creates the tree-view control. The maximum number of items in a tree view is based on the amount of memory that is available in the heap.

So, anecdotally or otherwise, can someone give me a ballpark of what this means? I expect the stuff I'm doing in a treeview will be limited to < 1000 items for most cases but in some cases closer to 10000.

A: 

It means exactly as it says, the addition of treeview nodes will consume memory (reference objects that are placed on the heap) and the more you add the more it will consume. For your particular circumstance approx 10,000 I dont think memory will be a great issue for most modern day computers.

With large trees the best way I have found to deal with the loading of the tree is to load a nodes children only when the user expands the node - Loading on demand. This will save loading too many unnecessary nodes and hence reduce the amount of memory required.

David