From: Chris B. <Chr...@no...> - 2004-12-09 19:27:16
|
Arnd Baecker wrote: > P.S.: I agree on the speed issues. Unfortunately > most of the newer python graphics packages tend to be > slower than older packages. I think this has two reasons: 1) They are written more in Python, rather than wrapping an existing library written in C or whatever. 2) They often are back-end independent. This introduces an extra layer at every drawing command, and makes it difficult to take advantage of possible optimizations available for a given back end, like Arnd has done for his stuff. One thing that could help here is if all the drawing commands were "vectorized". This would mean that rather than asking the back-end to draw one primitive at a time, a whole set could be passed in. This would allow the back end to possibly optimize the drawing of the set. An example is wxPython's DC.DrawXXXList() methods. These methods take a python sequence of drawing primitives, and loop through that sequence in C++ code. It makes a huge difference when drawing simple objects, like points or line segments. I haven't looked closely at the matplotlib code to see if this can be done, but it could make a difference. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |