Results 1 to 3 of 3

Thread: QwtPlotCurve realtime efficiency tips

  1. #1
    Join Date
    May 2015
    Posts
    66
    Thanks
    10
    Thanked 17 Times in 17 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default QwtPlotCurve realtime efficiency tips

    Hello,

    • I have a QwtPlotCurve (say 5000 points) that is placed in a QwtPlot with axis auto scaling enabled.
    • The points keep entering a circular buffer continuously and every 20ms I need to plot the latest say 5000 points in the buffer.
    • Since I need to accurately auto-scale I need an iteration over all the 5000 points to calculate the bounding rectangle.


    I managed to implement these but I see that its not efficient (small lag in the UI).

    My question is: I would like to make it as efficient as possible. Some tips on these lines is much appreciated!
    Thanks

    Regards
    Vikram

  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: QwtPlotCurve realtime efficiency tips

    If your series is time related I can imagine, that one dimension is increasing and min/max are the first/last coordinate. But for the other coordinate you have to iterate.
    But if this loop isn't implemented in a horrible way it shouldn't be responsible for the lag you have noticed.

    But a cycle of 20ms is also not necessary - even visual animations usually run at 40 fps only.

    Uwe

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

    Vikram.Saralaya (27th January 2016)

  4. #3
    Join Date
    May 2015
    Posts
    66
    Thanks
    10
    Thanked 17 Times in 17 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QwtPlotCurve realtime efficiency tips

    Hello Uwe,

    Yes the x axis is the time axis. As for the y axis, I will reduce the frame rate eventually but now I am testing the limits..

    I haven't done much optimization other than enabling cliprectangle and filtering. Is some kind of a buffering/overlay useful for this kind of an application?

    Regards
    Vikram

Similar Threads

  1. Replies: 8
    Last Post: 9th February 2014, 12:37
  2. Replies: 8
    Last Post: 18th October 2012, 07:23
  3. Replies: 1
    Last Post: 11th May 2012, 08:02
  4. efficiency
    By szisziszilvi in forum Newbie
    Replies: 2
    Last Post: 5th January 2011, 17:31
  5. The efficiency of QtAlgorithm
    By calmspeaker in forum Qt Programming
    Replies: 1
    Last Post: 19th September 2008, 06:52

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.