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


Groups > comp.lang.python > #77669 > unrolled thread

weakref, memory management and execution slow down in PyQt4

Started bykjs <bfb@riseup.net>
First post2014-09-07 06:42 +0000
Last post2014-09-07 06:42 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

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

#77669 — weakref, memory management and execution slow down in PyQt4

Fromkjs <bfb@riseup.net>
Date2014-09-07 06:42 +0000
Subjectweakref, memory management and execution slow down in PyQt4
Message-ID<mailman.13846.1410078084.18130.python-list@python.org>

[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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web