views:

70

answers:

1

I would like my cl.exe (the c++ compiler process) processes to run at lower than normal priority so that my UI threads are not affected. I have turned on /MP builds for most of my projects and want to take advantage of all the CPUs, but don't want the box to be bogged down and unusable.

A co-worker wrote a utility that monitors threads and allows users to select process names to drop priorities for, but I was wondering if it might be possible to write a plugin for visual studio that was notified on all calls to CL.exe so that you can programmatically lower the priority.

So, is this possible? VS 2008 - C++ builds for now.

+1  A: 

You have the BuildEvents object that the DTE exposes, it will be for triggered all types of project but its a good stating point to see if the CL is running. (There are some examples on how to use it in Google Code Search).
Or (And this is hacky and I don't know if it will work) you can write a CL.exe replacer that will run the actual CL at low/ideal priority and route all the parameters to it.

Shay Erlichmen