|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
treeview/treemodel with 100K's elementsHi,
Playing around with the treemodel, I've discovered that adding a lot of items to the model can become slow, if the number of added items is big enough (>20K on my PC). So, is there any way to implement a 'lazy' tree model? By lazy I mean: 1. load only the nodes for the items that are currently displayed, without loading their children) 2. add an 'expander' image if the item has children 3. load the children when the node is expanded An alternative to 2 and 3, if 2 is not possible would be to load only the first children and delay the loading of the remaining children till the node is expanded. Any ideas or recommendations? Thanx. Johnny _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: treeview/treemodel with 100K's elementsOn Tue, May 13, 2008 at 9:01 AM, Ionutz Borcoman <iborco@...> wrote:
> Hi, > > Playing around with the treemodel, I've discovered that adding a lot of items > to the model can become slow, if the number of added items is big enough > (>20K on my PC). > > So, is there any way to implement a 'lazy' tree model? By lazy I mean: > 1. load only the nodes for the items that are currently displayed, without > loading their children) > 2. add an 'expander' image if the item has children > 3. load the children when the node is expanded > > An alternative to 2 and 3, if 2 is not possible would be to load only the > first children and delay the loading of the remaining children till the node > is expanded. > > Any ideas or recommendations? > > Thanx. > > Johnny you can certainly do this. I know other people have implemented things like this. You'll probably need to implement a custom treemodel. For number 2, I think what most people do is add a 'dummy' child and replace it with the actual children when the row is expanded. -- jonner _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: treeview/treemodel with 100K's elementsOn Tuesday 13 May 2008 7:12:03 pm Jonathon Jongsma wrote:
> On Tue, May 13, 2008 at 9:01 AM, Ionutz Borcoman <iborco@...> wrote: > > Hi, > > > > Playing around with the treemodel, I've discovered that adding a lot of > > items to the model can become slow, if the number of added items is big > > enough (>20K on my PC). > > > > So, is there any way to implement a 'lazy' tree model? By lazy I mean: > > 1. load only the nodes for the items that are currently displayed, > > without loading their children) > > 2. add an 'expander' image if the item has children > > 3. load the children when the node is expanded > > > > An alternative to 2 and 3, if 2 is not possible would be to load only > > the first children and delay the loading of the remaining children till > > the node is expanded. > > > > Any ideas or recommendations? > > > > Thanx. > > > > Johnny > > you can certainly do this. I know other people have implemented > things like this. You'll probably need to implement a custom > treemodel. For number 2, I think what most people do is add a 'dummy' > child and replace it with the actual children when the row is > expanded. Is there any doc on how to write a custom model? _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: treeview/treemodel with 100K's elements> Is there any doc on how to write a custom model?
> I have used chapter 11 in "GTK Treeview tutorial": http://scentric.net/tutorial/sec-custom-models.html You may see my implementation here: https://xbelsync.svn.sourceforge.net/svnroot/xbelsync/trunk/xbelSync/include/GUI/ElementsTreeView.h https://xbelsync.svn.sourceforge.net/svnroot/xbelsync/trunk/xbelSync/src/GUI/ElementsTreeView.cpp _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: treeview/treemodel with 100K's elementsOn Wednesday 14 May 2008 9:48:23 am Tiberius DULUMAN wrote:
> > Is there any doc on how to write a custom model? > > I have used chapter 11 in "GTK Treeview tutorial": > http://scentric.net/tutorial/sec-custom-models.html > > You may see my implementation here: > https://xbelsync.svn.sourceforge.net/svnroot/xbelsync/trunk/xbelSync/includ >e/GUI/ElementsTreeView.h > https://xbelsync.svn.sourceforge.net/svnroot/xbelsync/trunk/xbelSync/src/GU >I/ElementsTreeView.cpp Cool. I'll take a look. Thanx. _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
| Free Forum Powered by Nabble | Forum Help |