I am interested in using Matplotlib for real-time
> updating plot applications. My concern is with system load
> issues (they're pretty high). Using the code below, which
> came off of an earlier posting to this list, on a pc (2.4
> gig processor) memory usage ranges from 20 - 50+ megs
> (there's a cycling pattern) and 30-40% of the cpu is being
> used for this basic app. If left to run for 20 minutes or
> so, it seems to crash (entire screen turns grey and reboot
> is required to get machine back to working order).
I answered this problem on the support request you submitted to
sourceforge a couple of days ago. I'll paste in my response from
the sourceforge site
Logged In: YES
Thanks for the bug report!
I have spent a lot of time optimizing matplotlib for
pltotting and interacting with large data sets, but not for
frequently redrawing small data sets.
Fortunately, I was able to replicate the bug on my system.
I identified a memory leak in pygtk in a function I use for
rotating tick labels.
It turns out almost all the CPU usuage (and memory) was for
repeatedly computing layout information, rotations, and so
on for text onthe tick labels. Since these rarely change
(eg, in system demo) I cache all the relevant information.
I also cache the result that is causing the memory leak in
pygtk, so repeated calls will not drain memory.
The result is a system demo with CPU usage reduced from
30-40% to 4-8% and memory consumption reduced from a growing
memory leak to a stable 1.2%.
Not bad. Please let me know if you continue to experience
performance issues. I I have updated CVS. I you have
trouble accessing CVS, email me at
jdhunter@...4... and I'll send you a snapshot.
I have no idea about the solaris redraw problem currently
Logged In: YES
I tracked down the memory leak in pygtk. I you are
intersting in patching your pygtk, the bug report and patch
Date: 2004-02-06 14:22
Date: 2004-02-06 15:51