Results 1 to 6 of 6

Thread: Screen refresh during heavy computation

  1. #1
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Screen refresh during heavy computation

    I'm working on an application that uses Qt 4.4.3, Mercury Open Inventor, HDF and some proprietary very math intensive legacy Fortran libraries.

    The program performs some very processor intensive computation on input files. While this is going on, dragging another window over the application corrupts it until the computation ends, and the main window is refreshed. The progress bar also doesn't appear for quite awhile.

    The computations populate data structures, but the data isn't used until the processinjg is complete. Basiclly, while the computation is going on, the only thing the program needs to do is keep the screen looking OK and show the progress bar.

    I think I need to stick to a thread-based approach, since the legacy code would be very difficult to break into chunks.

    I tried putting the computation in its own thread, and even experimented with lower priorities (e.g. QThread::LowPriority) but this didn't seem to help.

    Any ideas would be appreciated. Thanks in advance!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Screen refresh during heavy computation

    Are you a commercial Qt user? Do you have access to the latest Qt Quarterly? There is an article there that helps solve such issues. Besides that, are you sure you actually started the other thread? If you experience what you experience, it is likely you still do the computation in the main thread.

  3. #3
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: Screen refresh during heavy computation

    Yes, I'm a commercial user. How do I access the Qt Quarterly?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Screen refresh during heavy computation

    You should have received a link to the PDF by e-mail about 4 weeks ago. If you didn't get it, contact Qt Software.

  5. #5
    Join Date
    Aug 2008
    Location
    Cherry Hill, NJ USA
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Talking Re: Screen refresh during heavy computation

    Thanks! The article is exactly what I needed. The e-mail from Trolltech had gone to someone else in the company, so I wasn't aware of it until your reply.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Screen refresh during heavy computation

    Quote Originally Posted by martinb0820 View Post
    Thanks! The article is exactly what I needed.
    I'm glad you like it

  7. The following user says thank you to wysota for this useful post:

    martinb0820 (18th November 2008)

Tags for this Thread

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.