Hi
I'm expericencing a very annoying slowness of the new wxwidgets driver compared to its 'old' ancestor.
The procedure to test it is easy:
- compile plplot 5.15 with -DBUILD_TEST=ON and alternatively with -DOLD_WXWIDGETS=ON and -DOLD_WXWIDGETS=OFF. In both cases install and compare the time it takes to plot example c++/x110
- the time is ~10 larger with the new driver
- this factor goes as square of the size of the plot window (try with -geometry 3000x30000) wich almost never succeeds to plot with the new driver, and ~3 seconds for the old.
by comparison, X11 is instantaneous.
My configuration: Mageia 8 , wxwidgets 3.1 (wxgtk) , gcc 10.3.0 , plplot 5.15.0
Apologies if this has already been reported.
please read ' example c++/x11' in above report.
Hi, the culprit is the Clipper object used in DrawLine.
more precisely, because it calls wxRegion() which somehow calls gdk_cairo_region_create_from_surface() each time, this is terribly long.
making wxRect wxPLDevice::GetClipRegion() a wxRect and not a wxRegion, for example with:
return wxRect(cpoints[0],cpoints[2]);
//instead of return Region( 4, cpoints );
(and the declarations,etc)
is sufficient to get a reasonable speed.
Reasonable because the old driver is still 6 times faster.
I suggest strongly to patch this driver asap and trigger backports, as the current driver is so buggy.