Performance of Polar plot vs. Rectangular plot
I developed a wireless antenna pattern viewer that plots points from 0-360 degrees in rectangular form and in polar form. We noticed that the performance of the polar plot is much slower than the rectangular plot. Displaying, re-sizing and showing/hiding points in the rectangular plot is nearly instantaneous. With the polar plot, every action takes 5+ seconds to respond.
Does this sound normal? Does anyone have any suggestions to improve the performance of the polar plot?
I'm running with Solaris 9 on a SUN E3000 server with multiple 496 MHz cpu’s.
QT version:
qt4.4.0
qwt-5.1.1
qwtPolar-0.0.2
Thanks,
Re: Performance of Polar plot vs. Rectangular plot
Please start the polardemo example and check its replot performance on your box ( f.e move the canvas with the mouse ).
If it is slow too please play with the check boxes at the left and try to identify which options have a significant effect.
Uwe
Re: Performance of Polar plot vs. Rectangular plot
I tested a bit myself and detected at least one serious performance hog: painting with a clipping region from an ellipse. The penalty for each replot is about 500ms on my box ( Linux/X11 + Qt 4.1.1 ). Surprisingly the effect is much worse when antialiasing is disabled: ~4500ms.
If you don't need clipping ( the values of your curves, markers are inside the ranges of your scales ) you can avoid this problem by removing the line "painter->setClipRegion(..)" in QwtPolarPlot::drawItems.
Uwe
Re: Performance of Polar plot vs. Rectangular plot
Many thanks Uwe. I work with the original poster. We'll give your suggestions a try and will report back soon...
Re: Performance of Polar plot vs. Rectangular plot
Uwe - we commented out the clipping section of the code and rebuilt the library. The performance of the Polar plot increased a lot ! It went from taking 5-7 seconds to display to about 1 second.
Many thanks !
Re: Performance of Polar plot vs. Rectangular plot
Obviously a problem inside Qt. I have already contacted Trolltech support. I will try to introduce a workaround in the next QwtPolar release ( next month ).
Uwe
Re: Performance of Polar plot vs. Rectangular plot
Comparing the performance of Qt 4.4.1 vs. Qt 4.4.2 with the QwtPolar example:
A) With clipping and antialiasing
4.4.1: ~610 ms
4.4.2: ~340 ms
B) With clipping, no antialiasing
4.4.1: ~2180 ms
4.4.2: ~220 ms
C) No clipping, with antialiasing
4.4.1: ~155 ms
4.4.2: ~150 ms
D) No clipping, no antialiasing
4.4.1: ~15 ms
4.4.2: ~9 ms
Looks like it's worth to upgrade to 4.4.2.
But the fact, that clipping takes longer than antialiasing doesn't sound reasonable to me and needs further investigations.
Uwe
Re: Performance of Polar plot vs. Rectangular plot
We will give it a try, thanks Uwe!