PDA

View Full Version : Workload to the Application:Related to Signal and Slot



soumyadeep_pan
1st May 2009, 05:29
I have developed an application in QT3, under FC9+Xenomai, which has one Real time thread and a Data Display Slot.
The Data Display slot is updating decimal values into 20-30 label boxes as well as images into almost 35-50 labels. The display slot is fired from the Real time thread using a QTimer::timeout() signal and the slot will be fired in every 500ms using <QTimer object>->start(ZERO,TRUE). Will be my application can be slow due this signal-slot communication ??? I am seeing my application getting slow after 2-3hrs of execution and I am not doing anything else except the updating the display, even system also not running any other process that may slow down the application performance.

Thanks in advance for any help .......

fullmetalcoder
1st May 2009, 10:10
I am seeing my application getting slow after 2-3hrs of execution and I am not doing anything else except the updating the display, even system also not running any other process that may slow down the application performance.
Certainly not due to signal/slot mecanism then or it would not be affected by execution time. Probably a huge memory leak causing intensive page swaps or an infinite loop hidden in a thread somewhere...

soumyadeep_pan
1st May 2009, 10:52
Certainly not due to signal/slot mecanism then or it would not be affected by execution time.
I have read in one of the post that, if we use signal-slot mechanism and the particular slot is not able to finish the job before the next firing occurs it may slow down the application .... But I do not have much exposure in that ..... Also if it happens how that can be checked ???


Probably a huge memory leak causing intensive page swaps or an infinite loop hidden in a thread somewhere...
Yes this may be a chance, I am looking for that.

As I told I have 35-40 images updating each time the display slot is called, the display
slot called different class member functions which are actually updating the images using the below code -
<QLabel Object>->setPixmap(QPixmap(ImagePath("image.png")));
Can it be slow down to load the images using setPixmap() function ?????

Thanks in advance ...........

fullmetalcoder
1st May 2009, 11:08
As I told I have 35-40 images updating each time the display slot is called,
[...]
Can it be slow down to load the images using setPixmap() function ?
Creating pixmap can be slow especially from big images but I think the biggest issue here is that you are probably loading the same images over and over every 500ms which is probably unnecessary and not very resource-friendly.

You should consider giving QPixmapCache a try.