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 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 pylab import *
plot([1,2,3])
show()
while the same do-nothing window directly in pyOpenGL is around
2000fps on the same machine.
I would like to understand why this is so slow and if it can be fixed.
Nicolas
On Jul 27, 2011, at 3:28 PM, Benjamin Root wrote:
On Wednesday, July 27, 2011, Nicolas Rougier
<nicolas.roug...@inria.fr <mailto:nicolas.roug...@inria.fr>> 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
performances. Without drawing anything, I can hardly reach 100FPS and
I wonder if I did something wrong ? (The backend is
available backend_pyglet.py
<http://www.loria.fr/~rougier/tmp/backend_pyglet.py
<http://www.loria.fr/%7Erougier/tmp/backend_pyglet.py>> and the test
file is at test_backend_pyglet.py
<http://www.loria.fr/~rougier/tmp/test_backend_pyglet.py
<http://www.loria.fr/%7Erougier/tmp/test_backend_pyglet.py>>)
>
> Second, I've been experimenting with proper anti-alias technics
(using shaders) and the results are not so bad so far (IMHO) :
> Antialiased line with thickness varying by 0.1 pixels:
> http://www.loria.fr/~rougier/tmp/aa-line.png
<http://www.loria.fr/%7Erougier/tmp/aa-line.png>
> (don't paid attention to the cap, it's not done yet)
>
> Antialiased circles (small circles position is increased by 0.1 pixels)
> http://www.loria.fr/~rougier/tmp/aa-circle.png
<http://www.loria.fr/%7Erougier/tmp/aa-circle.png>
> (I can post source code if anyone is interested)
> I don't know yet if all matplotlib artists can be drawing using
these technics.
>
> My question relates to the cairo backend that now seems to support
gl and shaders. Does anyone know the status of the gl-backend and how
it would improve performances of matplotlib ? (I had a hard time
finding any information).
>
> Nicolas
Nicolas,
I want to immediately encourage you to continue on your efforts.
PLEASE make a fork on github so that we may be able to experiment
better.
Cheers!
Ben Root
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel