From: Arnd B. <arn...@we...> - 2004-12-22 14:43:10
|
Hi John, On Tue, 21 Dec 2004, John Hunter wrote: > >>>>> "imaginee1" == imaginee1 <ima...@gm...> writes: > > imaginee1> Hi, after spending a nice afternoon profiling the > imaginee1> dynamic examples and looking a bit through the code, we > imaginee1> can make a few comments on the performace of the wx > imaginee1> backends. We have used kcachegrind to display the > imaginee1> results of hotshot - all files can be found under > imaginee1> http://www.physik.tu-dresden.de/~baecker/tmp/profiling/ > > Hi Arnd, thanks for your profiling information - I very much like the > hotshot graphs! Nikolai and I were also quite impressed, in particular because there is another window in which one can see the corresponding lines of code, including timings (even down to the wxpython level!). However, we don't understand the output completely. One reason certainly is that we don't know the matplotlib code well enough. Another reason is that there might be some glitches (either kcachegrind or the conversion script). We just did some more profiling, for TkAgg, GTK, GTKAgg, WX and WXAgg, see: http://www.physik.tu-dresden.de/~baecker/tmp/profiling2/ From this we get for all **Agg backends that - new_gc - _draw_solid - draw_text eat up a major part of the time. Another important part is spread in the draw chain (for example from 74.3% in to 47.0 %+10.3 % in GTKAgg). Best, Nikolai and Arnd P.S: we just looked at backend_gtk.py. Couldn't one safely replace def draw_lines(self, gc, x, y): x = x.astype(nx.Int16) y = self.height*ones(y.shape, nx.Int16) - y.astype(nx.Int16) self.gdkDrawable.draw_lines(gc.gdkGC, zip(x,y)) by def draw_lines(self, gc, x, y): x = x.astype(nx.Int16) y = self.height - y.astype(nx.Int16) self.gdkDrawable.draw_lines(gc.gdkGC, zip(x,y)) ? It might give a small improvement. P.P.S: Thanks for mentioning good experiences with GTK under Windows - we will give it a try. |