matoo
asked on
Setting the priority of VC++ compiler on NT
I want to set the priority of the Visual C compiler as low to improve the performance of my machine during compilation. I can set it manually through the task manager - but I'd like dev studio to launch it with a low priority to make my life better.
Does anyone know how to do this?
thanks,
matt
Does anyone know how to do this?
thanks,
matt
I would imagine that DevStudio is calling the compiler, linker, etc. with a call to CreateProcess. I don't see any easy way to modify the priority that DevStudio uses when creating those process. You could probably hook the CreateProcess call for DevStudio and modify the priority, but that would be a lot of work.
ASKER
Maybe this is more of an NT operating system question? is there a way of pre-specifying the priority of a given executable file?
Sure there's a way. Whoever creates the process specifies the initial priority of the process. If you create a process with CreateProcess, you can specify the priority of the new process. That is not NT-specific. You might be able to find some obscure setting in DevStudio to change the priority with which it creates processes, otherwise it creates them at a certain priority and there's not much you can do about it before the fact. After they are created, you can change their priority. If you want to do some really low-level stuff, you can hook CreateProcess and modify the priority yourself before creating the process, but that would be a lot of work.
ASKER
Any idea how I go about doing this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'll check it out - thanks for your help!