You are right, I should definitely install pygtk on my
> system to check that, I wonder how a 3X increase in FPS
> is possible: after all, de-activating blit in the TkAgg
> produce only a 1.5X increase (and no image of course
The gtk advantage over tk depends on the example. For images (eg
for Andrew's dynamic image) the advantage is approx 1.5x. For the
simple line drawing dyanmic example you posted, it's about 3x. I
suppose the difference is that in the image example, there is a much
larger, shared computational burden in agg, whereas with the simple
line drawing example the blitting difference is more pronounced.
> It could be more important for GTKAgg, if it is closer to
> raw Agg speed than TkAgg and FltkAgg...Something to test
> would be to use the Agg backend without exporting the
> pixmap buffer but doing the drawing, and check how many
> draw/second one can have on the examples, to really check
> the penalty associated to the different toolkits, and the
> maximum gain we can have by reusing Agg buffer instead of
> creating one for each draw...Is this doable?
I'm certainly happy to try it. One last thing you may want to do
before sending in your updates tomorrow is to run backend_driver.py in
the examples subdir to make sure your changes don't create any
problems with the known examples.
> In these cases nothing performance wise, in fact the way
> you use should me marginally faster (avoiding the
> creation/destruction of python buffer objects ). Python
> buffer objects is a way for me to implement the transfer
> without copy of the Agg buffer to fltk in more "abstract"
> way: no need to implement a c extension that know both
> the internals of agg and fltk, I split it using the
> python buffer as a standard protocol (buffer objects were
> intended for just this use, I think...). This is not
> very important, but it could simplify things if there is
> multiple renderer and multiple toolkits to bind...like if
> alternative to Agg is implemented (or multiple version of
> Agg must be supported)...and I guess that the overhead of
> this creation/destruction of python buffer objects is
> really negligeable.
Another area it may help is in backend_gtk and backend_wx, which *do*
use string methods to access the agg image buffer.