[PyQt] help with performance issue

Hans-Peter Jansen hpj at urpla.net
Mon Apr 11 22:00:37 BST 2011

On Monday 11 April 2011, 21:31:11 Matt Chambers wrote:
> I'm hoping there is a PyQt historian out there that can answer this
> question for me.
> We have a major  application that we've been unable to use anything
> beyond Pyqt 4.3 due to what I think is a performance issue with
> setVisible.  I'd like to give an example but this is proprietary code
> and I can't seem to get a simple example to exhibit the problem
> without bringing in the kitchen sink, I'm working on it though.  What
> I do have is some cProfile numbers.  It doesn't really matter what
> version of Qt or python we use. (You can assume we've tested many of
> them over the years) Currently we're using Qt 4.5.2 and python 2.6.4.
> What we have is somewhat of a disclosure widget that when clicked
> will show some data and/or more disclosure widgets. In 4.7, cProfile
> shows PyQt spending a lot more time in '<built-in method setVisible>.

You forgot to mention, from what class your offending method derives.
Anyhow, I don't think, that cProfile is the proper instrumentation for 
that kind of issue, since PyQt is throughoutly compiled code, you 
should cope with that, and do proper profiling on that level. If that's 
not possible, your best bet is bisection.

Otherwise, you can only hope, that Phil has a spontaneous idea..


More information about the PyQt mailing list