views:

395

answers:

5

I'm running programs from Eclipse (on Windows) that eat a lot of CPU time. To avoid bogging down my whole machine, I set the priority to Low with the Task Manager. However, this is a cumbersome manual process. Is there a way Eclipse can set this priority automatically?

EDIT: I realized that each particular launcher (Java, Python etc) has its own configuration method, so I will restrict this question to the Java domain, which is what I need most.

A: 

A better alternative is configure the amount of memory that Eclipse will use: http://www.eclipsezone.com/eclipse/forums/t61618.html

And do a google search about -Xmx and -Xms parameters for JVM (which you could configure for runners inside Eclipse).

Kind Regards

marcospereira
i have no need to change the memory usage actually, which is easy as you say. i am running CPU-intensive programs.
adum
+2  A: 

I'm assuming that you launch these programs using External Tools. If so, then you can modify the launch command to use the start /low hack described earlier. However, if these applications have a special launch type (like Java Application or similar), then you're in trouble. The only way you could actually change this would be to crack open the source for Eclipse, find that launch type and where it dispatches tasks and then modify it to use start /low. Sorry, but I don't think there's a simple solution to this.

Daniel Spiewak
A: 

I spent some time a while back to investigate this. There is no method inside Java to lower the priority (as far as I could see), so you need to employ the "start /min" approach. I didn't try to get that working.

Instead I got a multi-kernel processor. This gives room for other stuff, even if a Java program runs amok on one kernel.

Strongly recommended.

Thorbjørn Ravn Andersen
A: 

I would like this as well, odd that it is not possible, really. I know you can set thread-priorities, but I think in windows-land, threads are all scheduled "inside" the process priority so to speak.

sandos
A: 

If you need it only in development you can set the priority of all other processes to high...

Martin