From: John H. <jdh...@ac...> - 2004-02-09 15:36:08
|
>>>>> "derek" == derek bandler <d_b...@ho...> writes: derek> I am interested in using Matplotlib for real-time derek> updating plot applications. My concern is with system load derek> issues (they're pretty high). Using the code below, which derek> came off of an earlier posting to this list, on a pc (2.4 derek> gig processor) memory usage ranges from 20 - 50+ megs derek> (there's a cycling pattern) and 30-40% of the cpu is being derek> used for this basic app. If left to run for 20 minutes or derek> so, it seems to crash (entire screen turns grey and reboot derek> 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 Date: 2004-02-06 14:22 Sender: jdh2358 Logged In: YES user_id=395152 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 jdh...@ac... and I'll send you a snapshot. I have no idea about the solaris redraw problem currently JDH Date: 2004-02-06 15:51 Sender: jdh2358 Logged In: YES user_id=395152 I tracked down the memory leak in pygtk. I you are intersting in patching your pygtk, the bug report and patch are here http://bugzilla.gnome.org/show_bug.cgi?id=133681 |