Results 1 to 8 of 8

Thread: Performance of Polar plot vs. Rectangular plot

  1. #1
    Join Date
    Jun 2008
    Posts
    18
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Question 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,

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default 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

  3. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default 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

  4. #4
    Join Date
    Sep 2008
    Posts
    15

    Default 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...

  5. #5
    Join Date
    Sep 2008
    Posts
    15

    Default 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 !

  6. #6
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default 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

  7. The following user says thank you to Uwe for this useful post:

    qmonkey (17th September 2008)

  8. #7
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default 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

  9. #8
    Join Date
    Jun 2008
    Posts
    18
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Performance of Polar plot vs. Rectangular plot

    We will give it a try, thanks Uwe!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.