weakref, memory management and execution slow down in PyQt4
torriem at gmail.com
Tue Sep 9 01:51:25 CEST 2014
On 09/07/2014 02:39 PM, kjs wrote:
> The code is minimal. The only other widgets are a start button that
> fires off the plotting and a stop button that calls sys.exit().
Unfortunately there are no data files in your git repository so I can't
> Lines 112-114 appear to be causing the weakref proliferation.
Is there a reason you are using setattr and getattr instead of a proper
data structure? both of those calls are rather expensive. Would
probably be cheaper to use some kind of array, dictionary, or other
purpose-built data structure?
More information about the Python-list