Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77669

weakref, memory management and execution slow down in PyQt4

Date 2014-09-07 06:42 +0000
From kjs <bfb@riseup.net>
Subject weakref, memory management and execution slow down in PyQt4
Newsgroups comp.lang.python
Message-ID <mailman.13846.1410078084.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

I built a small application using PyQt4 and pyqtgraph to visualize some
data. The app has 32 graphs that plot deques of size 512. The plots are
updated when 200 ints are cycled through each deque.

The plotting slows down in a linear manner with respect to time. In
other words after cycling through 100,000 data points the time between
calls to process events is much longer than it was at T0.

I have done a little memory profiling. Watching the process on top, it's
clear that there is some memory leak. I also tried invoking
objgraph.show_most_common_types(). This test reveals that the number of
objects being created plateaus, except for weakref objects, which keep
growing and growing.

I have come to believe that the growing number of weakrefs is slowing
down execution. Is my analysis misguided? How can I introspect further?
If the slowdown can be attributed to weakref escalation, what are some
next steps?

Thanks,
Kevin

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

weakref, memory management and execution slow down in PyQt4 kjs <bfb@riseup.net> - 2014-09-07 06:42 +0000

csiph-web