best way to produce many charts

Please keep all replies on list so others can contribute to the
discussion and future generations of googlers can benefit from it
(reply to all)

If you can provide a stand-along script that replicates the problem,
please post it. Our canonical memory leak testing script (attached)
does not appear to be leaking in my tests with the PDF backend.

memleak_hawaii3.py (1.05 KB)

···

On Wed, Jul 2, 2008 at 3:20 PM, laurent oget <laurent@...2078...> wrote:

I use the Pdf backend. I did do some digging in the GC module but have not
found anything yet

Hi,

John, if I run your script I found following behaviour of distinct
backends in terms of memory leaks:

QtAgg - ok
Agg - ok
GTKAgg - oh, memory leak
PDF - ok, as you mentionend

Hope it helps, seems it is not a problem of matplotlib?!

Cheers,
Florian

P.S: I use matplotlib svn with following configuration:

···

============================================================================
BUILDING MATPLOTLIB
            matplotlib: 0.98.2
                python: 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) [GCC
                        4.1.3 20070929 (prerelease) (Ubuntu
                        4.1.2-16ubuntu2)]
              platform: linux2

REQUIRED DEPENDENCIES
                 numpy: 1.2.0.dev5283
             freetype2: 9.16.3

OPTIONAL BACKEND DEPENDENCIES
                libpng: 1.2.15beta5
               Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
              wxPython: 2.8.4.0
                        * WxAgg extension not required for wxPython >= 2.8
                  Gtk+: gtk+: 2.12.0, glib: 2.14.1, pygtk: 2.12.0,
                        pygobject: 2.14.0
                    Qt: Qt: 3.3.7, PyQt: 3.17.3
                   Qt4: Qt: 4.3.2, PyQt4: 4.3
                 Cairo: 1.4.0

OPTIONAL DATE/TIMEZONE DEPENDENCIES
              datetime: present, version unknown
              dateutil: matplotlib will provide
                  pytz: 2007d

OPTIONAL USETEX DEPENDENCIES
                dvipng: no
           ghostscript: 8.61
                 latex: 3.141592
               pdftops: 3.00

EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
             configobj: 4.4.0
      enthought.traits: 2.6b1-mpl

[Edit setup.cfg to suppress the above messages]

--
--
Florian Mueller
Remote Sensing, Snow & Ice, Meteorology, IT

Innsbruck, Austria
ICQ:
Skype: icephase26

John, if I run your script I found following behaviour of distinct
backends in terms of memory leaks:

QtAgg - ok
Agg - ok
GTKAgg - oh, memory leak
PDF - ok, as you mentionend

Hi John,

I don't understand whats going on, but when I remove the Line
"close(1)" from your script and use "GTKAgg" instead of "PDF" the
memory leak of my previous post is gone!

Cheers,
Florian

···

--
--
Florian Mueller
Remote Sensing, Snow & Ice, Meteorology, IT

Innsbruck, Austria
ICQ:
Skype: icephase26

Apparently there is a leak in the creation and destruction of the gtk
pixel buffer. If you clear it with clf, instead of closing it,
perhaps you aboid this leak. Just speculating. But it is good to
know that it doesn't leak with a clf.

JDH

···

On Thu, Jul 3, 2008 at 5:23 AM, Florian Mueller <icephase26@...287...> wrote:

I don't understand whats going on, but when I remove the Line
"close(1)" from your script and use "GTKAgg" instead of "PDF" the
memory leak of my previous post is gone!