Re: [matplotlib-devel] Experiments and questions / OpenGL backend

2011-07-29 Thread Nicolas Rougier
> > Nicolas, > > I would like to add to Mike's comments by making it clear why I am interested > in having OpenGL for matplotlib. It is not for speed. The last time I > checked, a good portion of time is actually spent on the axis tickers and > automatic limits. So, if speed is your goal, t

Re: [matplotlib-devel] Experiments and questions / OpenGL backend

2011-07-29 Thread Nicolas Rougier
I'm sorry to have used the term "useless" since it was not what I meant. In fact, after profiling the simple draw example, I realized there were a lot of necessary operations that were not quite visible from my "external" point of view. I was just thinking "why the hell is it so slow to draw s

Re: [matplotlib-devel] Experiments and questions / OpenGL backend

2011-07-29 Thread Benjamin Root
On Fri, Jul 29, 2011 at 11:05 AM, Michael Droettboom wrote: > ** > Nicolas, > > I'm not sure how you've reached your conclusion. > > The 21,000 calls to Line2D.draw (i.e. 21 per frame) are easily explained > since each grid line (or tick) is in fact a line. > > The 10,000 calls to Tick.draw (i.e.

Re: [matplotlib-devel] Experiments and questions / OpenGL backend

2011-07-29 Thread Michael Droettboom
Nicolas, I'm not sure how you've reached your conclusion. The 21,000 calls to Line2D.draw (i.e. 21 per frame) are easily explained since each grid line (or tick) is in fact a line. The 10,000 calls to Tick.draw (i.e. 10 per frame) are because there are 10 tick labels. likewise for Text.dra

Re: [matplotlib-devel] Experiments and questions / OpenGL backend

2011-07-29 Thread Nicolas Rougier
I just did it using the regular python profiler (and a pyglet backend because glut cannot be easily profiled). Here are some results for exactly 1000 frames displayed: > python -m cProfile -s cumulative test_backend_pyglet.py 7723453 function calls (7596399 primitive calls) in 16.583

Re: [matplotlib-devel] Experiments and questions / OpenGL backend

2011-07-28 Thread Michael Droettboom
Have you tried running it in the Python profiler? I find this script [1] in combination with kcachegrind to be very useful in answering these kinds of questions. [1] http://codespeak.net/pypy/dist/pypy/tool/lsprofcalltree.py Mike On 07/28/2011 07:16 AM, Nicolas Rougier wrote: I've created

Re: [matplotlib-devel] Experiments and questions / OpenGL backend

2011-07-28 Thread Nicolas Rougier
I've created a fork at: https://github.com/rougier/matplotlib/tree/gl-backend The name of the backend is glut (it requires OpenGL) and does not display anything, it only measures fps. It seems to be stuck at 100fps with the following test script: import matplotlib matplotlib.use('glut') from

Re: [matplotlib-devel] Experiments and questions / OpenGL backend

2011-07-27 Thread Benjamin Root
On Wednesday, July 27, 2011, Nicolas Rougier wrote: > > > Hi all, > > I've been testing various idea around the idea of a GL backend, and I would have a few questions. > First, I tried to use the backend template to quickly test an empty pyglet backend and I've been quite surprised by the bad perf