Re: gtk.TreeModel.iter_children() method, how often should it be called?

On Tue, Jun 23, 2009 at 7:50 PM, Gerald Britton<gerald britton gmail com> wrote:
> Did some more  checking and inserted some debugging statements, I found that:
> on_iter_next is called 23808 times after updating one line in my
> 43-element tree.  That''s almost twenty-four thousand times!  I'm
> going to try to find a way to implement your idea but I'd really like
> to know:

That many calls is really excessive for a model containing only 43
items.  Tree view calls the iter_next() and iter_children() methods
when redrawing the view.  So, it might be the case that tree view is
doing many unnecessary redraws, leading to the unnecessary walks of
the model.

Or maybe you are using GtkTreeModelSort and are seeing many
unnecessary sorting operations?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]