TreeView Control With 264MB Data

TreeView Control With 264MB Data

Post by Le Chaud L » Mon, 21 Jul 2008 15:36:16


Hi All,

The title says it all. The following dummy return statement and
comment is currently in my code:

return; // DEFECT: We have no business populating this tree control
with 264MB of data...

Actually, the control itself will not have 264BM, but 100,000 nodes
would not be unreasonable.

I could probably figure out a scheme to make this work, but I wanted
to get other's advice before fiddling.

TIA,

-Le Chaud Lapin-
 
 
 

TreeView Control With 264MB Data

Post by Alex Blekh » Mon, 21 Jul 2008 17:05:29


If you want my opinion, then I should tell you that a tree-view
with 100,000 nodes is madness. This is design error.

Alex

 
 
 

TreeView Control With 264MB Data

Post by Alexander » Wed, 23 Jul 2008 12:03:57

It (100,000 nodes) doesn't work, anyway, in Windows XP, at least. The
scrollbar gets messed up badly.
 
 
 

TreeView Control With 264MB Data

Post by Grzegorz W » Wed, 23 Jul 2008 15:15:12


I had similar problem with listviews long time ago. For really large
listviews there were serious performance issues. After reaching certaine
size the disposing of such listview took much more than creating it.

The solution I came up with was to keep the data in my own structure and
populate the listview only with those view objects that are visible on
the screen. So the listview has no vertical scrollbar (all its objects
fits on the screen) and I provide my own scrollbar. By responding to
scrollbar messages I populate the listview with corresponding objects.


I don't know if you can do something similar with treeview, if not the
alternate solution I was considering is to create my own listview
control (well a simpler version). So you might want to do your own
treeview control.

--
Grzegorz Wr骲el
677265676F727940346E6575726F6E732E636F6D
 
 
 

TreeView Control With 264MB Data

Post by Alex Blekh » Wed, 23 Jul 2008 20:13:36


There is so called virtual list-view for this very purpose.

"Virtual List-View Style"
http://www.yqcomputer.com/ #Virtual_ListView_Style

HTH
Alex
 
 
 

TreeView Control With 264MB Data

Post by Grzegorz W » Wed, 23 Jul 2008 21:06:53


Then it looks like I have reinvented the wheel. :) It was long time ago
when when I had this problem but this style was already there...

--
Grzegorz Wr骲el
677265676F727940346E6575726F6E732E636F6D
 
 
 

TreeView Control With 264MB Data

Post by Le Chaud L » Fri, 25 Jul 2008 01:13:56

On Jul 22, 7:06燼m, Grzegorz Wr骲el </dev/ XXXX@XXXXX.COM >




I thought about it this morning and realized that 100,000 nodes in
TreeView should not be a problem. The perfermance depends not on the
total number of nodes in the tree, but the distribution of nodes in
the tree. A spread of 10 at each expansion, 5 expansions deep from the
root, will result in 100,000 nodes.

I will populate the tree control dynamically, as expansion occurs.
The number of children of any particular node is on the order of
10,000 right now, though might be a bit less.

-Le Chaud Lapin-