hi Álinson, There is now a reasonable performance testing infrastructure in git. The runner script is in tests/test_performance.py.
Here are my results before ==> after your patch: paint_rotated 2.071 ==> 2.209 scroll_nozoom 1.489 ==> 1.600 startup 0.912 ==> 0.896 paint 1.100 ==> 1.179 saveload 15.667 ==> 15.925 layerpaint_nozoom 1.628 ==> 1.759 paint_zoomed_out_5x 11.002 ==> 9.732 Nice. layerpaint_zoomed_out_5x 13.340 ==> 10.488 Nice. scroll_zoomed_out_5x 32.804 ==> 3.395 Great! memory_zoomed_out_5x 164911 ==> 184020 Okay, a small price to pay. Overall the results are nice and there seems to be no notable regression. A small regression could be suspected for the non-zoomed tests, but that could also just be measurement error (I am taking the minimum of 3 runs for each test). Layer switching (from solo to fully rendered) will probably profit from the same performance gain as scrolling. On Wed, Jul 08, 2009 at 05:53:34PM -0300, Álinson Santos wrote: > Here is an updated version of the patch that I sent earlier. > It now uses a different, and faster, strategy. The speed gain is quite impressive now, especially at the maximum zoom-out. I see now in the profiler that your previous patch had a lot of python overhead, which you got rid of. > No background surface mipmapping yet, though. When this is fixed it can go into main repository. I did not give it much thought yet, but I'm sure there is a practical solution for this. > Zooming out now requires no additional memory, whereas previously it > required lots. Try comparing memory usage and performance for > zoom=1/8. It's pretty drastic already. ;) Yes that is true. Zooming out into emptiness is also an important usecase. The memory test above does measure it with a big crowded canvas instead. For the code, only one more comment: the term "dirty" in your patch seems a bit too generic. Someone not familiar with the code might think of quite a few possibilities for which that member could be used or double-used. Better rename it to mipmap_dirty or similar. >+ if self.tiledict.get((tx,ty)) is None: could be simplified to if (tx, ty) in self.tiledict: bye, Martin _______________________________________________ Mypaint-discuss mailing list [email protected] https://mail.gna.org/listinfo/mypaint-discuss
