Results 1 to 14 of 14

Thread: Qwt 6.0.1 three times slower than 5.2.0

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qwt 6.0.1 three times slower than 5.2.0

    I'm using Qt 4.6.3,
    Painter and pen settings are default (QPainter::TextAntialiasing, pen solid line, 1px black).

    When I've launched the app on Ubuntu with -graphicssystem raster both versions are slower, but not even close to what's happening on windows.
    5.2.0 plots 2m points in 340ms (as oposite to 250ms), 6.0.1 plots 2m points in 770ms (as opposite to 400ms).

    I'll take your suggestion and tomorrow I'll write simple pure Qt app to verify if the issue lies with Qt or not and post it here.

    Anyway, it may be worth considering adding a way of selecting which rendering system to use (int or double) as not everybody (for example me ) needs double precision.

    I'll keep you updated.

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

    Default Re: Qwt 6.0.1 three times slower than 5.2.0

    Quote Originally Posted by Spitfire View Post
    Painter and pen settings are default (QPainter::TextAntialiasing, pen solid line, 1px black).
    The default is a pen width of 0 - a pen width of 1 is running into a different render path and might be significantly slower,

    Uwe

  3. #3
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qwt 6.0.1 three times slower than 5.2.0

    I've done simple Qt example of painting using float and integers (attached) and on windows - the results is the same.
    Floats are dead slow.

    I did some search through Qt bug database and I found an issue complaining about drawpolyline being slow with antialiasing, but it's not the case here.

    Any chances of getting a way of using ints instead of doubles for drawing in Qwt 6.x.x?
    I can't see any other way of making it any faster
    Attached Files Attached Files

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

    Default Re: Qwt 6.0.1 three times slower than 5.2.0

    Do you have a similar effects on 32bit systems - and of course with Qt 4.7.x ?

    Uwe

  5. #5
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qwt 6.0.1 three times slower than 5.2.0

    I don't have access to any 32bit system at the moment, but I'll check it over the weekend and let you know.

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

    Default Re: Qwt 6.0.1 three times slower than 5.2.0

    Quote Originally Posted by Spitfire View Post
    I've done simple Qt example of painting using float and integers (attached) and on windows - the results is the same.
    I checked your code on my box ( Linux/X11, Qt 4.7.3 ):

    • With basic X11 using floats is significantly faster ( about 10-30 % )
    • Enabling the raster paint engine ( -graphicssystem raster ) I can confirm that doubles are much slower ( about 200-250 % )

    So the "right" solution means obviously more than simply using integers instead of floats.

    I will check the code of the raster paint engine why it performs so bad for floats.

    Uwe

  7. #7
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qwt 6.0.1 three times slower than 5.2.0

    I've tested 32bit Windows XP box.

    The problem is the same, with 5.2.0 plot is rendered in 1700ms, with 6.0.1 it takes 5600ms.

    Let me know if you find anything interesting.
    Cheers!

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

    Default Re: Qwt 6.0.1 three times slower than 5.2.0

    In SVN trunk ( Qwt 6.1 ) QwtPlotCurve tries to use QPolygon instead of QPolygonF ( depending on various parameters ).

    If you don't want to have this optimization you can enable the new flag QwtPlotItem::RenderFloats. Like expected setting this flag slows down the frame rate of the refreshtest example, when using the raster graphics system.

    Uwe

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

    Default Re: Qwt 6.0.1 three times slower than 5.2.0

    Just one more hint: in Qwt 5.2 was a flag QwtPlotCurve::PaintFiltered that removes points that are mapped to the same position as their predecessor. As long as your samples are not only noise it should have a much bigger impact on the performance than the QPolygon/QPolygonF flag.

    I have reintroduced this optimization to Qwt 6.1 ( QwtPlotCurve::FilterPoints ). In situations, where the curve is rendered to an integer based paint engine ( all beside Svg and Pdf ) I would expect, that it will reduce the polygon heavily for a 2 million point series.

    You can check the refreshtest example to see its effect.

    Uwe

Similar Threads

  1. QVector Slower than STL Vector
    By lynchkp in forum Newbie
    Replies: 3
    Last Post: 5th December 2010, 10:50
  2. Qt 4.6.3 slower than 4.6.2
    By Nik8768 in forum Installation and Deployment
    Replies: 3
    Last Post: 19th July 2010, 12:13
  3. Replies: 6
    Last Post: 15th April 2010, 19:56
  4. Replies: 11
    Last Post: 2nd July 2009, 00:41
  5. why Qt4 is so slower than Qt3 ?
    By xuyaojun1980 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 11th February 2009, 18:32

Tags for this Thread

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.