Results 1 to 9 of 9

Thread: 100% CPU load

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Join Date
    Jan 2011
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    3

    Lightbulb Re: 100% CPU load

    Quote Originally Posted by SixDegrees View Post
    Also, you should be sure you actually have a problem in the first place. How are you measuring CPU usage?
    Are you seeing an actual slowdown in your application or in the system as a whole? If not, what is it youi're trying to improve?
    yes, I'm 100% sure. I've several keyboard handlers in the app, and without this loop response to keypress is immediate, but when this loop is running I've like 1.5 sec delay.
    I'm using standart gnome system monitor, and when this loop is active CPU load jumps to 100%, and after it stops it comes back to 0%.


    Added after 53 minutes:


    Seems I found a problem, may be it would help someone ...
    I was using
    Qt Code:
    1. this->port = new QextSerialPort(portName, QextSerialPort::EventDriven);
    To copy to clipboard, switch view to plain text mode 
    as it was suggested in included "PortListener" example. I switched to
    Qt Code:
    1. this->port = new QextSerialPort(portName, QextSerialPort::Polling);
    To copy to clipboard, switch view to plain text mode 
    and CPU usage dropped to expected 2-3%.

    I tested it on Ubuntu 10.10 (2.6.35-25-generic #44-Ubuntu SMP) and Debian 5.0.7 (2.6.29 with Vortex86DX patch)

    p.s. Using QTimer member instead of static QTimer::singleShot doesn't give any noticable difference. And thanks to everyone who tried to help
    Last edited by kartun; 24th February 2011 at 07:11.

Similar Threads

  1. DLL won't load
    By waynew in forum Qt Programming
    Replies: 8
    Last Post: 25th October 2010, 01:48
  2. Load QPixmap
    By jano_alex_es in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 10th June 2010, 08:44
  3. Load dll on Symbian
    By hubbobubbo in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 9th February 2010, 14:08
  4. Qt4 does not load JPG's.
    By Teuniz in forum Qt Programming
    Replies: 3
    Last Post: 3rd September 2007, 23:06

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
  •  
Qt is a trademark of The Qt Company.