Put UI-thread into low-priority at startup?
Moderator: Moderators
Put UI-thread into low-priority at startup?
Would it be possible to put the DCPlusPlus.exe process into low-priority at startup?. Todo this with code I mean. I guess it would be possible and if anyone with better Visual C++ knowledge than myself would apply some code here I would be more than happy to try it out. In the meantime I'll try to find out how to do it myself . I've made it a habit to manually set the process to low-priority because of the problems with UI responding upon file-refresh or re-hashing. I would like to know if this is a reasonable suggestion or not, please feel free to express what you think.
Regards
Regards
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."
Actually I've tested this now. This might be an ugly hack but It works and I get much less disturbance on the UI from DC++. I changed from default THREAD_PRIORITY_NORMAL to THREAD_PRIORITY_IDLE in Thread.cpp and it seems to work (at least right now Anyway this is just a test and I don't know if this is relevant for everybody.
Regards
Regards
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."
-
- Forum Moderator
- Posts: 587
- Joined: 2003-05-07 02:38
- Location: Sweden, Linkoping
-
- Forum Moderator
- Posts: 587
- Joined: 2003-05-07 02:38
- Location: Sweden, Linkoping
Huh?, it's 20 lines long, are you kidding me? Hmmm............, Well, it's a bit weird. When I double-click on DCPlusPlus.exe from explorer I get it to start in idle-priority but if I start it from menu or shortcut it starts in normal-priority....... I don't get it. Is this some default behaviour of Win OS'es?
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
-
- Forum Moderator
- Posts: 587
- Joined: 2003-05-07 02:38
- Location: Sweden, Linkoping
No, the word prirorty doesnät even show up in it.Guitarm wrote:Huh?, it's 20 lines long, are you kidding me?
Code: Select all
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "stdinc.h"
#include "DCPlusPlus.h"
#include "Thread.h"
#include "ResourceManager.h"
#ifdef _WIN32
void Thread::start() throw(ThreadException) {
join();
if( (threadHandle = CreateThread(NULL, 0, &starter, this, 0, &threadId)) == NULL) {
throw ThreadException(STRING(UNABLE_TO_CREATE_THREAD));
}
}
#else
void Thread::start() throw(ThreadException) {
join();
if(pthread_create(&threadHandle, NULL, &starter, this) != 0) {
throw ThreadException(STRING(UNABLE_TO_CREATE_THREAD));
}
};
#endif
/**
* @file
* $Id: Thread.cpp,v 1.6 2004/01/04 17:32:47 arnetheduck Exp $
*/
-
- Posts: 506
- Joined: 2003-01-03 07:33
Actually, I don't quite agree with you on this one. I notice, not a big, but noticeable difference on my Athlon XP 1800+. I most often have alot of apps running at the same time and, as been discussed before, the most noticeable problem, at least for me, has been the affect of the UI (kinda natural in a graphical env. btw). But, of course, this is just a test and I just want to know peoples opinion. Thank you for yoursGargoyleMT wrote:So what's the upside of this? People can disable the progress bars - is there more that's sucking down CPU time? I hardly notice it on my P4, and even on my P3/866 laptop...
Joakim, if you're not kidding this time I get a bit scared.........No, the word prirorty doesnät even show up in it.
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."
-
- Forum Moderator
- Posts: 587
- Joined: 2003-05-07 02:38
- Location: Sweden, Linkoping
GargoyleMT wrote:So what's the upside of this? People can disable the progress bars - is there more that's sucking down CPU time? I hardly notice it on my P4, and even on my P3/866 laptop...
Ok, ok I give up, well you're right, it doesn't make much of a difference.ivulfusbar wrote: Ha, what takes CPU is I/O and search-reply. Atleast if you have a large amount of files. )
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."
Wow......ok, we can forget about this thread....... I fixed my comp, upgraded a few drivers, went from PIO to DMA, upgraded BIOS.....Well, this is a new machine , So guys, thanks for answering my stupid questions anyway (I'ts thanks to DC++ and you I got the machine updated).
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
Oh, I think there's lot'sa people who even don't know about this. I mean, I had to sniff the internet to get a hold of all the latest drivers for just about anything in the machine. What made the biggest difference was the latest ALi drivers for the disks of course. But I'm not in heaven all the way.......I still think that there's room for improvement of the hashing algo but that's another q.
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."