From: Eric F. <ef...@ha...> - 2007-07-05 17:53:50
|
Michael Droettboom wrote: > Eric Firing wrote: >> Attached are runs with gtk, wx, qtagg, and tkagg. Quite a variety of >> results: tkagg is best, with only slow memory growth and a constant >> number of python objects; qtagg grows by 2.2k per loop, with no >> increase in python object count; wx (which is built on gtk) consumes >> 3.5k per loop, with an increasing object count; gtk consumes 1.8k per >> loop with an increasing object count. >> >> All runs are on stock ubuntu feisty python 2.5. > Thanks for these results. Unfortunately, I'm seeing different results > here. [dagnabbit!] None of them have an increasing object count for > me, which leads me to suspect there's some version difference between > your environment and mine that isn't being accounted for. > > Gtk[Agg|Cairo] -- 1.3k per loop. > Wx[Agg] -- 0.010k per loop > QtAgg -- 2.3k per loop (which is in the same ballpark as your result) > Qt4Agg -- 1.4k per loop (which seems to be in the same ballpark as > Darren Dale's result) > TkAgg -- 0.29k per loop > > I don't know if the size of memory per loop is directly comparable > between your environment and mine, but certainly the shape of the curve, > and whether the number of Python objects is growing is very relevant. > > I made some more commits to SVN on 07/03/07 necessary for recent > versions of gtk+ and qt. Did you (by any chance) not get those > patches? It would also be interesting to know which versions of the > toolkits you have, as they are probably different from mine. Is it safe > to assume that they are all the stock Ubuntu feisty packages? In any > case, I have updated memleak_gui.py to display the relevant toolkit > versions. I've also attached a script to display the toolkit versions. > Its output on my machine is: > > # pygtk version: (2, 10, 4), gtk version: (2, 10, 9) > # PyQt4 version: 4.2, Qt version 40300 > # pyqt version: 3.17.2, qt version: 30303 > # wxPython version: 2.8.4.0 > # Tkinter version: $Revision: 50704 $, Tk version: 8.4, Tcl version: 8.4 Here is mine--not very different from yours: # pygtk version: (2, 10, 4), gtk version: (2, 10, 11) # PyQt4 version: 4.1, Qt version 40202 # pyqt version: 3.17, qt version: 30307 # wxPython version: 2.8.1.1 # Tkinter version: $Revision: 50704 $, Tk version: 8.4, Tcl version: 8.4 Everything is stock ubuntu feisty. wx is built on gtk. I'm pretty sure I did the tests after your 07/03/07 commits. I just updated from svn and tried to rerun the wx test, but ran into an error: efiring@manini:~/programs/py/mpl/tests$ python ../matplotlib_units/unit/memleak_gui.py -dwx -s1000 -e2000 > ~/temp/memleak_wx_0705.asc Traceback (most recent call last): File "../matplotlib_units/unit/memleak_gui.py", line 58, in <module> pylab.close(fig) File "/usr/local/lib/python2.5/site-packages/matplotlib/pylab.py", line 742, in close _pylab_helpers.Gcf.destroy(manager.num) File "/usr/local/lib/python2.5/site-packages/matplotlib/_pylab_helpers.py", line 28, in destroy figManager.destroy() File "/usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_wx.py", line 1403, in destroy self.frame.Destroy() File "/usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_wx.py", line 1362, in Destroy wxapp.Yield() NameError: global name 'wxapp' is not defined Eric |