Results 1 to 2 of 2

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

Threaded View

Previous Post Previous Post   Next Post Next Post
  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 14:21.

Similar Threads

  1. Replies: 8
    Last Post: 6th December 2019, 18:11
  2. SSL support slows the start of the app
    By dmitry64 in forum Qt Programming
    Replies: 2
    Last Post: 10th June 2013, 13:47
  3. Qt4.7.0 Phonon module slows down my app
    By Apsta in forum Qt Programming
    Replies: 2
    Last Post: 20th April 2012, 14:06
  4. QTcpSocket slows down in receiving after several minutes
    By cutie.monkey in forum Qt Programming
    Replies: 1
    Last Post: 9th December 2009, 22:14
  5. rendering svg using QGraphicsSVGItem slows doen the performance
    By sanjayshelke in forum Qt Programming
    Replies: 4
    Last Post: 1st September 2009, 07: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
  •  
Qt is a trademark of The Qt Company.