From: Steve C. <ste...@ya...> - 2004-06-11 08:33:09
|
On Thu, 2004-06-10 at 05:52, John Hunter wrote: > Hi Eric, > > You can test the new release which includes both Steve's changes and a > number of fixes on my end. I'll attach the script below that I used > to profile the leak, a modified version of your script. By my > numbers, the average memory consumed per loop is down from 145.9 using > 0.54.1 to 12.3 using 0.54.2. Not perfect, but more than 10x better. > > I have definitely identified a leak in freetype (as mentioned above, > which is fixed in freetype CVS) and there appears to be a leak in > libpng but I have tracked down precisely where. Neither of these are > terribly large. I strongly suspect that some of the remaining leak is > my doing, so I'll continue to try and sniff these out. The python > code uses a lot of circular references (figures contain axes and text > which in turn contain a reference to the figure that contains them and > so on) which makes the task a little harder. > > Let me know how it goes. > > JDH I ran your memory test script on my Fedora 2 PC, it gave Average memory consumed per loop: 168.3600 on the previous matplotlib Average memory consumed per loop: 41.7200 on the latest matplotlib from CVS. That's a big improvement. For the last week or so I've been unable to use the GTK+ backend with matplotlib (and PyGTK) from CVS. Instead of producing a plot it colors the whole figure black. I think this may be a colormap problem. Steve |