Results 1 to 6 of 6

Thread: Slow Multi-Threading

  1. #1

    Default Slow Multi-Threading

    It appears no matter what I do in my program, the CPU usage won't go over 57-58%.

    I have plots, and each plot has its own thread. The threads are for drawing each of the plots. As intensive as drawing is, I really expect for it to user higher cpu. Not only that but my program is lagging very badly, yet stuck at 57% percent cpu usage.

    I was curious what possible things that could cause this when using threads. Also, im using the qwt library and I'm basically running the draw with it; however, qwt uses fonts in several places...I have tried to taken care to separate the text drawing from the rest of the drawing but could that also quite possibley be causing the lag? Could using widgets or text possibley cause these effects?
    Anyways if anyone could speculate for me I'd appreciate it. Love to just hear some ideas of possibilities it could be because my brain is fryed. =D

  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: Slow Multi-Threading

    How (and what) exactly do you draw in those threads?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3

    Default Re: Slow Multi-Threading

    Lines mostly. The threads draw plots. pwt plots for that matter...

  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: Slow Multi-Threading

    But draws them on what? widgets?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5

    Default Re: Slow Multi-Threading

    No, im drawing on a QImage, one the process is done the image is emitted and a slot converts it to a pixmap which is later drawn to the screen.

  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: Slow Multi-Threading

    Can we see the code for:
    1. connecting respective signals and slots
    2. spawning threads
    3. slots doing the conversion
    4. threads' run() methods
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Qt4, slow on windows ?
    By eto.ethome.sk in forum Qt Programming
    Replies: 3
    Last Post: 28th May 2009, 00:34
  2. Why is drawText so terribly slow?
    By Ntoskrnl in forum Qt Programming
    Replies: 8
    Last Post: 1st August 2008, 19:15
  3. QTextEdit slow to insert text
    By thomaspu in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 12:05
  4. Multi threading ...
    By kiranraj in forum Qt Programming
    Replies: 2
    Last Post: 18th June 2007, 16:51

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.