PDA

View Full Version : Performance Issues in Qt-4.4.3 / Qwt-5.1.1



swamyonline
24th January 2009, 20:42
hi ppl,
i think the performance issue is known to many. I wrote a simple application in which there is a QMainWindow and a child QFrame attached to it. in the child frame, there are some qwt plots and some qt widgets like labels and buttons. some data will be received with UDP socket and the widgets are updated at every 100ms with the received data. the qwt plots are enabled with zoomers and panners with autoreplot disabled and anti-aliasing enabled.
the issue is, the application is run on both Linux (RHEL 4) and Windows XP with mingw. its running pretty smooth and fast on Windows XP but seems to be a bit slow on Linux. the zooming and panning operations are also slow. i came to know that, its because of windows' better graphics engine.
in general, how can we improve performance of the application? what are the optimization and performance improvement methods and options that can be applied?

it would be of great help,in particularly for new programmers, if general c++/qt programming tips and guidelines are posted for improving performance of qt applications.

thank u very much in advance. bye

swamy.

seneca
25th January 2009, 12:51
Here you can find some information to start:

http://www.ics.com/learning/learning_center_downloads/

Uwe
25th January 2009, 18:50
the zooming and panning operations are also slow.
Qt renders before it clips, what is one of the main reasons for performance issues, when graphics are rendered. When you enable QwtPlotCurve::ClipPolygons, Qwt clips all lines before it passes them to Qt.

If you want to improve the overall performance of your application you need to understand what's going on. F.e. overload QwtPlot::replot and add some debug statements, so that you can see when and how often it is called and how long each call needs.

Uwe