Hi all, I've implemented support for OpenMP based multithreading for the current (Python-based) surface backend. Because the backend calls into the Python interpreter to get tile data, this whole section is synchronized using the OpenMP "critical" directive[1].
On the brushlib benchmarks, this gives excellent speedups on my 2 core Intel Core i5 M520: up to 65% increase for large brushes and less than 10% slowdown for tiny brushes (where performance is not an issue anyway). This is very close to what I get using the GEGL backend, which does not need to do so much synchronization when fetching tiles. However, using the GUI performance tests I get very mixed results. In one set of test runs: scroll_zoomed_out_2x_onelayer: 8.800000 (780%) paint_zoomed_out_5x: 1.172571 (17%) layerpaint_zoomed_out_5x: 1.156669 (16%) brushengine_paint_hires: 1.091002 (9%) ... rest unchanged ... scroll_nozoom: 0.972973 (-3%) scroll_zoomed_out_5x: 0.970874 (-3%) layerpaint_nozoom: 0.950122 (-5%) paint: 0.948916 (-5%) paint_rotated: 0.940476 (-6%) scroll_zoomed_out_1x_onelayer: 0.800000 (-20%) scroll_nozoom_onelayer: 0.750000 (-25%) And in another: scroll_nozoom: 25.666667 (2467%) paint_zoomed_out_5x: 1.088084 (9%) layerpaint_zoomed_out_5x: 1.060632 (6%) .... rest unchanged ... brushengine_paint_hires: 0.933682 (-7%) layerpaint_nozoom: 0.801448 (-20%) paint_rotated: 0.782366 (-22%) paint: 0.780457 (-22%) scroll_nozoom_onelayer: 0.600000 (-40%) scroll_zoomed_out_1x_onelayer: 0.500000 (-50%) I will investigate these things further, but in the meantime it would be good to see what kind of results others get. # To test scons enable_openmp=true ./mypaint # To run GUI perf tests. Note: takes about 5 minutes, should not be disturbed while running python2 tests/test_performance.py -a Just copy paste the SUMMARY section for each run (with and without enable_openmp=true) into the mail. 1. http://gitorious.org/mypaint/mypaint/blobs/283df90826bcc9d3ed6c32e44e9f8f5ed3ed9de4/lib/pythontiledsurface.c -- Jon Nordby - www.jonnor.com
_______________________________________________ Mypaint-discuss mailing list Mypaint-discuss@gna.org https://mail.gna.org/listinfo/mypaint-discuss