PDA

View Full Version : Slow application



Pieter from Belgium
13th October 2006, 16:42
I ported an application to Qt 4.2 under Linux, primarily using the porting tools and qt3support classes.
When the program is executed, X takes about 50% of processor time, but the application is rather responsive.
After some time it becomes very slow. Even simple mouse presses take some time. X consumes about 95% of CPU, even when the application does nothing. Other applications remain responsive...

Any ideas?

jpn
13th October 2006, 18:52
Try profiling (http://www.gnu.org/software/binutils/manual/gprof-2.9.1/html_mono/gprof.html) your program and detect the potential bottle necks.

wysota
13th October 2006, 20:43
You might be leaking memory. Does your "free" command show extensive swap memory usage?

Pieter from Belgium
17th October 2006, 09:44
I finally pinpointed the problem, and it is entirely within our code. Somehow a QTimer has sneaked in months ago, causing a repaint every 100 milliseconds :crying:
Removing this, the application executes normally.

Thanks anyway.