Never mind. I read the source to gtktreeview.c and I now see that there is nothing I can do about the calls to on_iter_next(iter). I looks like the treeview is determined to know which rows have children even before it has to display the row.
So I am stuck with 40K calls to on_iter_next(iter) just to show 10 rows on the screen. Ho hum. Regards Richard On Tuesday 24 Jan 2006 20:19, Richard Taylor wrote: > Hi > > I am trying to build a subclass of GenericTreeModel for use with a large > Berkeley DB database. I have it just about working but one thing I noticed > is that TreeView appears to work out the length of the GenericTreeModel by > repeatably calling GenericTreeModel.on_iter_next(iter). For a large tree > this can take a long time. > > As I know the size of the Model I would like to be able to just tell the > TreeView what it is without it having to do all those calls. > > Is there anyway to do this? > > > BTW: I already have set_fixed_height_mode(True) on the TreeView and > set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) on all the TreeViewColumns with the > widths explicitly set with set_fixed_width(100). So the TreeView is not > walking the model in order to get the column widths. > > Many thanks > > Richard -- You can normally find me on Jabber as [EMAIL PROTECTED] _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/