Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #77706
| Date | 2014-09-08 17:51 -0600 |
|---|---|
| From | Michael Torrie <torriem@gmail.com> |
| Subject | Re: weakref, memory management and execution slow down in PyQt4 |
| References | <540BFE43.5030006@riseup.net> <loom.20140907T152314-538@post.gmane.org> <540CADDD.3050501@riseup.net> <540CB15C.2060008@gmail.com> <540CC278.4050106@riseup.net> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.13880.1410220299.18130.python-list@python.org> (permalink) |
On 09/07/2014 02:39 PM, kjs wrote: > The code is minimal[0]. 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 run it. > > 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?
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: weakref, memory management and execution slow down in PyQt4 Michael Torrie <torriem@gmail.com> - 2014-09-08 17:51 -0600
csiph-web