On Thu, Nov 06, 2003 at 04:01:48PM +0100, Igor Stroh wrote:
>
> On Mi, 2003-11-05 at 22:51, Jeffrey C. Ollie wrote:
>
> > I'm implementing a custom TreeModel to display the contents of a large
> > debug file. Things are working very well, except that when the model is
> > first assigned to the view, the view walks through every row in the
> > model before displaying! This makes the initial display very slow!
> > Once the initial display is completed scolling around in the view is
> > very fast. I wrote the custom TreeModel to avoid reading & parsing
> > every line in the file until the line actually needed displaying. Is
> > this the normal behavior of a TreeView or is there a bug somewhere?
>
> I don't think so. I have an app where I display data from an LDAP tree
> using the vanilla TreeStore & TreeView. The scrolling is pretty fast,
> although I have more then 500 in average. Maybe it's because I assign
> the data for the child nodes (if any) on the fly, i.e. when a parent
> node is beeng expanded...
Here's Kris himself confirming my assumption:
<kris> that's normal behavior;
<kris> what you are seeing is the validation phase
<kris> where the treeview measures every row
<kris> so it can setup the scrollbar
<kris> column widths, etc
<kris> this is a very costly process;
<kris> gtk+ 2.4 will have a "fixed height" mode, which will shortcircuit
the validation phase
<kris> and then treeview will be incredibly fast
<kiko> cool
<kiko> so the answer is "do nothing, it will get faster by itself" :)
<kris> basically
Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/