Results 1 to 4 of 4

Thread: Workload to the Application:Related to Signal and Slot

  1. #1
    Join Date
    Sep 2008
    Location
    Chennai
    Posts
    36
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3
    Platforms
    Unix/X11

    Question Workload to the Application:Related to Signal and Slot

    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 .......

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Workload to the Application:Related to Signal and Slot

    Quote Originally Posted by soumyadeep_pan View Post
    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...
    Current Qt projects : QCodeEdit, RotiDeCode

  3. #3
    Join Date
    Sep 2008
    Location
    Chennai
    Posts
    36
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Workload to the Application:Related to Signal and Slot

    Quote Originally Posted by fullmetalcoder View Post
    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 ...........

  4. #4
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Workload to the Application:Related to Signal and Slot

    Quote Originally Posted by soumyadeep_pan View Post
    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.
    Current Qt projects : QCodeEdit, RotiDeCode

Similar Threads

  1. Connection of custon signals/slots
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 23rd December 2008, 07:04
  2. retrieving signal name in a slot
    By Baschterl in forum Qt Programming
    Replies: 2
    Last Post: 10th November 2008, 20:44
  3. Replies: 12
    Last Post: 18th September 2008, 15:04
  4. Signal & Slot editor
    By Ishark in forum Qt Tools
    Replies: 4
    Last Post: 28th May 2008, 15:20
  5. signal slot conection using a string, not a SLOT
    By rianquinn in forum Qt Programming
    Replies: 6
    Last Post: 5th February 2006, 18:52

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.