Results 1 to 4 of 4

Thread: Performance issues QwtPlot

  1. #1
    Join Date
    May 2011
    Posts
    17
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Performance issues QwtPlot

    Hi.

    We're experiencing performance issues. We have a customized plot, that is derived from QwtPlot, which receives data every second. Our plot has a history of 60seconds, on the x-axis.

    Worst case scenario is 25 curves, with 1500 points per curve, so maximum 37 500 points per second. We've also tried upping the update interval to 4 seconds, with more or less same result.

    After some seconds we're experiencing high cpu-load up to 100 %, and we're not quite sure how to improve that. From what I've read 37500 points shouldn't be that much compared to other plotting scenarios.

    We're running Ubuntu 11.10, and using Qwt 6.0.1.

    Basically we've run out of ideas on what might cause the performance degrading, and would like som pointers on where to start looking if anyone has got any tips to where to start.

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

    Default Re: Performance issues QwtPlot

    There are a lot of parameters, that affect the performance - hard to say, what the reason is in your application without knowing your code.

    I recommend to build Qt and Qwt in release mode ( if this is not still the case ) and check the refreshtest example. With this example you can see the performance of a curve plot ( frames per seconds ) in your environment and modify several parameters to understand their impact on the performance.

    Potential reasons might be:


    • bad X11 configuration
    • using gradients for the canvas or plot background
    • antialiasing
    • using pens with a width > 0
    • no polygon clipping, when many points are far outside the visible area
    • rich text labels ( scales or plot items )
    • ...


    You could also try to start your application with the raster graphicsystem. In general it is not recommended ( by me - Nokia seems to think different, as it made it the default for Qt 4.8/X11 ), but it is different and you might detect problems of X11 - like the gradients on my box.

    Are there any other plot items - beside the curves ?

    Uwe

  3. #3
    Join Date
    May 2011
    Posts
    17
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Performance issues QwtPlot

    Hi Uwe.

    We turned of antialiasing and that improved the performance. We had bad X11 configuration on one of the machines, but that should be fixed.

    In addition to the curves, we have a dotted grid on our canvas. The canvas doesn't have any gradients, it's just black.

    We've tried the raster graphicssystem, without any significant change in performance.

    We only have a couple of points on each curve outside the visible area.

    Thanks for your help.

    Gerhard

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

    Default Re: Performance issues QwtPlot

    Overload QwtPlot::drawCanvas and add some simple time measurements using QElapsedTimer.


    • How long does it take ( ms ) to do a single call of drawCanvas on your box ?
    • When you configure the refreshtest example as close as possible to your situation ( comparable number of points ). What refreshrate do you see, when "Updates" is set to 20ms ?


    Uwe

    PS: Qwt and Qt are built in release mode ?

Similar Threads

  1. QtWebKit and flash performance issues
    By caelestis in forum Qt Programming
    Replies: 0
    Last Post: 7th February 2010, 05:08
  2. How to check performance related issues?
    By narendra in forum Qt Programming
    Replies: 2
    Last Post: 17th November 2009, 16:40
  3. Replies: 4
    Last Post: 14th May 2009, 10:31
  4. Performance Issues in Qt-4.4.3 / Qwt-5.1.1
    By swamyonline in forum Qt Programming
    Replies: 2
    Last Post: 25th January 2009, 17:50
  5. QAbstractProxyModel::mapToSource performance issues
    By maximAL in forum Qt Programming
    Replies: 2
    Last Post: 14th January 2008, 22:48

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.