[pygtk] hungry TreeStore... SOLVED (was GTK_MODULES=gail:atk-bridge)

Willie Walker William.Walker at Sun.COM
Fri Feb 13 22:56:11 WST 2009


Thanks for logging this as http://bugzilla.gnome.org/show_bug.cgi?id=571596.

I have a small guess as to what might be going on, but it's only a 
guess.  Without seeing the code in question, we can't be sure exactly 
what might be going wrong.  So, it'd be great if you can post some code 
as well.

Sometimes the application can be modified to do things more efficiently. 
  One example for tree views might be to separate the model from the 
tree view before performing huge operations on it.

For example:

         model = view.get_model()
         view.set_model(None)

         <<<perform a bunch of operations on the model>>>

         view.set_model(model)

This has been shown to improve things a lot.  In any case, logging the 
bug was a very good thing to do and it will give us a means to track 
this performance issue.

Thanks!

Will

PS - I care strongly about this because I want to see accessibility 
enabled by default some day.  We can't do that, however, until the 
performance issues are identified/understood/resolved.

Willie Walker wrote:
> Sandro - yikes!  This might be a good test case for helping improve the 
> efficiency of GAIL/ATK, or at least for identifying a gotcha one might 
> avoid in the UI code.  Can you log this as a performance-related bug 
> against the GTK+/gail component at http://bugzilla.gnome.org?
> 
> Will
> 
> Alessandro Dentella wrote:
>> Hi, 
>>
>>
>>
>>
>>
>> On Thu, Feb 12, 2009 at 04:40:31PM +0100, Alessandro Dentella wrote:
>>> Hi, since yesterday, on my linux Ubuntu 8.0.4 I'm experimenting very strange
>>> things that I don't see on other machines. TreeStore  'append' method is
>>> taking a huge amount of time as shown by this 'prun' inside ipython:
>>>
>>>    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
>>>       332    4.644    0.014    4.648    0.014 {method 'append' of 'gtk.TreeStore' objects}
>>>       495    0.490    0.001    0.490    0.001 {method 'set' of 'gtk.TreeStore' objects}
>>>
>>>
>>> the same program on a different machine:
>>>
>>>    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
>>>       495    0.011    0.000    0.011    0.000 {method 'set' of 'gtk.TreeStore' objects}
>>>       332    0.004    0.000    0.007    0.000 {method 'append' of 'gtk.TreeStore' objects}
>>>
>>>
>>>
>>> I'm not at all aware of any changes. I didn't upgrade any tools and I don't
>>> remember to have installed anything in the last 2 days.
>>>
>>> One more strangeness is that I'm having these messages:
>>>  Warning: /build/buildd/glib2.0-2.16.4/gobject/gsignal.c:2271: signal name
>>>  `selection_changed' is invalid for instance `0x88e2998'
>>>
>>> that I don't receive on other machines and I didn't receive until yesterday.
>>>
>>> doesn that give you any idea wher I could investigate to understand what
>>> happened?
>>
>> I solved the problem when answering to Laszlo and Albert (thnaks to both of
>> you). I realied that the error message (from the second problem) was related
>> to a directory that is not an Ubuntu nor one of mine  (>  Warning: /build/buildd/glib2.0-2.16.4/gobject/gsignal.c:2271: signal name
>>  `selection_changed' is invalid for instance `0x88e2998')
>>
>> So I remembered that a week ago I wanted to test gtkparasite. I had to
>> enable assistive tecnologies. At the end I got an enviromental variable
>> GTK_MODULES=gail:atk-bridge 
>>
>> It was sufficient to unset it and everithing is working correctly.
>>
>> I hope this can help others that may  get into troubles like this...
>>
>>
>> sandro
>> *:-)
>>
>>
>>
> 
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/



More information about the pygtk mailing list