On 12/18/2012 09:21 AM, Jason Grout wrote: > On 12/18/12 6:53 AM, Sturla Molden wrote: >> Interactive 2D plots can be sluggish too, if you have enough objects in >> them. It is not the backend that is sluggish. Replacing the backend does >> not speed up the frontend. >> >> OpenGL is only 'fast' if you have a frontend that exploits it (e.g. uses >> vertex buffers and vertex shaders). If you just use OpenGL for >> bitblitting an image or drawing vertices individually (glVertex*), it is >> not going to help at all. >> >> My impression is that whenever Matplotlib is 'too slow', I have to go >> down to the iron and use OpenGL directly. It tends to happen when there >> are too many objects to draw, and the drawing has to happen in 'real-time'. >> >> Observe that if we let OpenGL render to a frame buffer, we can copy its >> content into a Matplotlib canvas. Unless we are doing some really heavy >> real-time graphics, displaying the image is not going to be the speed >> limiting factor. Even though using OpenGL to swap framebuffers will be >> 'faster', you will not be able to tell the difference in an interactive >> Matplotlib plotting. > I'm curious: how come Chaco is so much faster for real-time plots? What > are the main technical differences to enable it to plot things much more > quickly? > I think this a great question -- one way to address this might be to find certain examples or plot types where the performance has a large gap and then drill down from there. There are so many different plot types and methods in both matplotlib and Chaco that it's hard to be general about performance issues. (And raw drawing performance isn't always the same thing as interactive performance, or file size or memory performance). I know years ago when I was working on the path simplification code in matplotlib it was way ahead of what Chaco was doing in that (very narrow and specific) case, but I haven't looked at Chaco much since.
Mike ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users