|
From: John H. <jdh...@ac...> - 2004-06-29 03:47:33
|
>>>>> "Andrew" == Andrew Straw <str...@as...> writes:
Andrew> Hi plotters, I've shamelessly modified dynamic_demo_wx.py
Andrew> to create dynamic_image_wxagg.py, attached. This is my
Andrew> initial attempt to get matplotlib to dynamically update
Andrew> images. Basically it all works hunky-dory except 1) an
Andrew> apparent memory leak and 2) flicker when I run this in
Andrew> linux (haven't tested other OSes). I offer #1 to John or
Andrew> other memory-leak hunters out there and ask if any WXpert
Andrew> can address #2. I've googled a bit and it appears the WX
Andrew> backend (from which WXAgg is derived) does the Right Thing
Andrew> and calls wxClientDC on a non-OS generated redraw request,
Andrew> which is supposed to reduce or eliminate flicker. The
Andrew> other tip is to catch EVT_ERASE_BACKGROUND, which I've
Andrew> also done to no apparent improvement. Thus, I ask for help
Andrew> -- any suggestions on how to eliminate this flicker?
Hi Andrew,
Haven't had a chance to test your example yet but hopefully I can take
a look tomorrow. I haven't done much memory leak testing against the
_image module yet so this will be a good opportunity. I very recently
rewrote _image.cpp using cxx. I trust you have a fresh CVS checkout?
As for the flicker problem, I've noticed it too, and would also be
thankful if any wx gurus have some advice.
BTW, wxagg currently uses a string copy in python to render agg to a
wx bitmap via a wx image. It would be nice if some enterprising
soul wrote some extension code ala _tkagg.cpp and _gtkagg.cpp which
transfers the agg canvas to wx directly. Should be a pretty big win
performance wise. We could keep the string method as a fallback in
case the extension wasn't compiled, but it would help for people who
want to use wxagg for dynamic applications (hint hint).
This should at least be on the goals page.
JDH
|