[Qt-interest] Qt Charting Component - Feedback Request

Sean Harmer sean.harmer at maps-technology.com
Tue Mar 8 11:50:02 CET 2011


Hi Uwe,

On Tuesday 08 March 2011 11:30:30 Uwe Rathmann wrote:
> Malyushytsky, Alex wrote:
> >>> Qwt supports incremental painting - check the oscilloscope example
> >>> in
> >>> Qwt 6. Isn't this "super-fast" ?
> > 
> > As far as I recall this had some issues, ...
> 
> Of course incremental painting is no solution for all type of plots. But if
> it is possible you can display very close to realtime with almost no CPU
> load.

Agreed. In fact with OpenGL it is often much better to simply redraw the 
entire scene every frame rather than wasting CPU cycles figuring out which 
parts need refreshing.

> Unfortunately there is a lot of FUD written ( also in this thread ) about
> the performance of Qwt. 

Apologies if I mis-stated anything. It is a long time since I used Qwt in a 
project. For info, my starting this plotting component is in no-way meant as 
an insult to Qwt. I think it is a great library and have recommended it to 
others. I simply wanted to try a different approach and to base it on 
QGraphicsView to enable easier animation support and QML in the future.

> That's why I wrote a demo called refreshtest, that
> does performance tests how long it takes to do full replots and shows the
> effect of different parameters.
> 
> On my box ( a single core Atom ) it measures the following:
> 
> a) For a curve with 10000 points: 135 fps
> b) For a curve with 1000 points: 406 fps
> 
> When I limit the refreshrate to 50 fps for a curve with 10000 points my CPU
> load for X-Server + application is about 50%.
> 
> There are a lot of factors, that affect the painting performance. f.e. with
> antialiasing the refresh rate drastically breaks down. No surprise - but
> there are also effects you wouldn't expect: f.e. filling a QPixmap (
> 1000x1000 ) with a gradient takes 300ms on my box ( X11 ). Filling an QImage
> of the same size only needs 20ms and even filling the image + converting it
> into a pixmap is much faster ( ~100ms ).
> 
> So take care, when using gradients as widget background on X11 !

Agreed. Gradients are a very slow path. Much better to cache the gradient 
filled object as a pixmap.

Comparisons between QPixmap and QImage depend upon what graphics system you 
are running Qt with. For the raster graphics system I think that they share 
the same back-end so conversions between them are fast.

ATB,

Sean




More information about the Qt-interest-old mailing list