Results 1 to 2 of 2

Thread: Replot() slows way down after switching from Qwt 6.1.0 to Qwt5

  1. #1
    Join Date
    Feb 2014
    Posts
    4
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Replot() slows way down after switching from Qwt 6.1.0 to Qwt5

    I started my project with Qt 4.6.3 and qwt 6.1.0. But since debian squeeze forced me to use an earlier version of qwt (not sure which, since I'm still a linux noob. I just know that I installed libqwt5-qt4, meaning header files in /usr/include/qwt-qt4), I've been running into a couple of problems.

    My plot shows a curve connecting dots. Each dot also has a qwtSymbol (a small 5x5px elipse) attached to it, since I needed to show with colors 3 different types of points. I've been working mostly with a set of data consisting of about 4k different points. With qwt 6.1.0 everything worked rather smoothly - and by that I mean that zoomer, panner or magnifier were fast. Now, after switching the version of qwt, it just works so slow... e.g. after selecting the zoomer rectangle the plot just freezes for about 5 seconds (or sometimes just hangs, or I lose my patience too quickly). I thought, maybe the replotting of that many symbols (actually markers with symbols) were the reason, but after commenting the symbol functionality out, it still is very slow.
    When I tried with a data set of 20 points, everything works well.

    Btw, after changing the qwt version I checked the virtual functions in classes inheriting from qwt classes to make sure the variables and names were appropriate (checked with qwt 5.2.1 documentation), so that should work fine.

    Any ideas? suggestions? (oh, and I am not using any antialiasing or setting any other render hints)

    This is some of my code (2 functions from plot constructor):
    Qt Code:
    1. void MyPlot::setupAxes(){
    2. setAxisTitle(QwtPlot::xBottom, QString(UNIT));
    3. setAxisTitle(QwtPlot::yLeft, QString("Process ID"));
    4. zoomOutToBase();
    5.  
    6. //createScaleDividerForY_axis();
    7. discreteScaleDraw= new DiscreteScaleDraw(dataFromSources);
    8. timeScaleDraw= new TimeScaleDraw;
    9. setAxisScaleDraw(QwtPlot::yLeft, discreteScaleDraw);
    10. setAxisScaleDraw(QwtPlot::xBottom, timeScaleDraw);
    11.  
    12. //disable minor ticks for y axis
    13. setAxisMaxMinor(QwtPlot::yLeft,0);
    14. }
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. void MyPlot::addPoints(){
    2. QPolygonF points=dataFromSources->getPoints();
    3.  
    4. curve->setData(points);
    5. curve->attach(this);
    6. // dotManager=new DotManager(this);
    7. // dotManager->addDotsToPlot(dataFromSources->tracedPoints);
    8. }
    To copy to clipboard, switch view to plain text mode 

    PS. I case you want to see how the plot looks like, it's sth like this:
    http://tinypic.com/view.php?pic=2znp...8#.UvNkDoZhauY
    Last edited by genau; 27th February 2014 at 13:21.

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

    Default Re: Replot() slows way down after switching from Qwt 6.1.0 to Qwt5

    qwt 5.2.1 has been released 2009 - and the only reason why it is popular nowadays is because of legacy code and its python bindings. Doing a backport of running code because of not being able to install a current Qwt version , hmmm ...
    Beside that I don't see a general reason why a replot of the same plot should take 5 seconds with Qwt 5.x, while it runs fast with Qwt 6.x. What the specific reason iin your case is, is hard to say without having the application running.

    IMHO it is a valid consideration if you want to go with Qt5 or Qt4, when starting a new project - but when going with Qt4 it doesn't make much sense with a version < Qt 4.8.

    Uwe

Similar Threads

  1. Replies: 8
    Last Post: 6th December 2019, 17:11
  2. SSL support slows the start of the app
    By dmitry64 in forum Qt Programming
    Replies: 2
    Last Post: 10th June 2013, 12:47
  3. Qt4.7.0 Phonon module slows down my app
    By Apsta in forum Qt Programming
    Replies: 2
    Last Post: 20th April 2012, 13:06
  4. QTcpSocket slows down in receiving after several minutes
    By cutie.monkey in forum Qt Programming
    Replies: 1
    Last Post: 9th December 2009, 21:14
  5. rendering svg using QGraphicsSVGItem slows doen the performance
    By sanjayshelke in forum Qt Programming
    Replies: 4
    Last Post: 1st September 2009, 06:52

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.