[PyQt] What happens there's many signals in PyQt?

Carlos Scheidegger cscheid at sci.utah.edu
Fri Jul 13 17:18:54 BST 2007

> Probably PyQt. If you can produce a simple example that demonstrates the 
> behaviour then I'll have a look at it.
> Phil

Ok, this simple example seems to trigger it. I've simply taken tutorial 5 and
added many superfluous QtCore.QObjects and connections. Change line 36 to
"generate_many = False" and things should be back to normal.

Note that there are many objects being generated: O(2^depth), where depth is
given in line 37, but only O(log depth) signals being emitted at every button

We haven't been able to fully determine what exactly in the system
configuration triggers this. It certainly seems system or version dependent:
we have seen this on macs and linux, but not all of the machines. In fact, at
least one linux and one mac computer does not experience the slowness. Even
worse, one of the systems that experiences slowdown in our main application
("big app") does not experience it in this small example ("toy app"), and I
couldn't trigger the problem in any small example.

Here's the best information we could gather.

System that doesn't experience slowdown, neither in big app nor toy app:
AMD64 Opterons, running Ubuntu Feisty, 4GB RAM

Python: 2.5.1 (r251:54863, May  2 2007, 16:27:44)  [GCC 4.1.2 (Ubuntu
sip: 4.5
Qt: 4.2.2
PyQt: 4.1

System that experiences slowdown in both big app and toy app:
Xeon, running RHEL4, 6 GB RAM

system: Linux-2.6.9-55.ELsmp-x86_64-with-redhat-4-Nahant_Update_5
Python: 2.5.1 (r251:54863, Jun 13 2007, 18:29:50)  [GCC 3.4.6 20060404 (Red
Hat 3.4.6-8)]
sip: snapshot-20070612
Qt: 4.3.0
PyQt: 4-snapshot-20070612

System that experiences slowdown in big app _but not_ in toy app:
PowerMac G5 Dual 2.5GHz, 4GB RAM

system: Darwin-8.10.0-Power_Macintosh-powerpc-32bit
Python: 2.4.4 (#1, Oct 18 2006, 10:34:39)  [GCC 4.0.1 (Apple Computer, Inc.
build 5341)]
sip: 4.6
Qt: 4.2.3
PyQt 4.2

Let me know if you need more information.

Thank you very much,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_signals.py
Type: text/x-python
Size: 2093 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070713/73eb305d/test_signals.py

More information about the PyQt mailing list