PDA

View Full Version : msleep slowdown



Galen
8th April 2010, 23:03
Okay, I realize this makes no sense at all, but my multithreaded program just started running slower. It launches 6 idle priority threads that each sort an array and periodically (every 10 ms) calls update on QWidgets that display the arrays graphically. I slow these sort threads down so you can see the progress. usleep doesn't work on my windows XP-64 PC so the options are no delay, delay using QueryPerformanceCounter (using windows.h) and delay using msleep(). With 0 you see nothing and with the former method it goes from close to instant to quite slow depending on the value. But with msleep it is painfully slow even with a time of 1. The funny thing is that it was not like this previously. The fastest algortithm went from 11 seconds to 60. I was screwing around with the gui trying to get borders around everything when I noticed, but I reverted those changes without luck. I have tried disabling large non-essential chunks of code, of only having one sort thread at a time, and making the update()s only occur every 1 second, and changing around the thread priorities, nothing works. I've also tried reinstalling QT.

Second problem is that the exes will not execute outside of the qt ide, but complain about missing dlls. The first time I found the dll and dumped it in syswow64 directory, but new ones just keep popping up as I copy each additional dll. I'm guessing there must be some more final way of compiling these.

thanks