View Full Version : Performance of Polar plot vs. Rectangular plot

11th September 2008, 21:59
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:


12th September 2008, 09:06
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.


12th September 2008, 11:10
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.


13th September 2008, 01:33
Many thanks Uwe. I work with the original poster. We'll give your suggestions a try and will report back soon...

17th September 2008, 01:20
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 !

17th September 2008, 06:07
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 ).


21st September 2008, 14:17
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.


22nd September 2008, 22:05
We will give it a try, thanks Uwe!