Bug 36880 - High processor usage when building
Summary: High processor usage when building
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: 3.0 M1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-25 04:54 EDT by William Whittle CLA
Modified: 2003-06-02 06:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Whittle CLA 2003-04-25 04:54:55 EDT
When Eclipse builds a project after I've changed a project setting it performs 
a full, fresh build. This obviously takes up a lot of processing power, but 
Eclipse seems to hog the processor so I can't use other programs while the 
build is happening. This doesn't seem to happen so much when building when 
saving a group of files and compile-on-save is turned on.

I don't know whether there is something that Eclipse could do to help this 
situation or whether it's a case of my builds requiring so much resources (such 
as disc access) that there's nothing that can be done except for telling me to 
get more memory.
Comment 1 Philipe Mulet CLA 2003-04-28 08:20:10 EDT
Would small sleep() invocations help here ?
Comment 2 Philipe Mulet CLA 2003-04-28 08:21:08 EDT
If we go down the path of background building, we will need the build process 
to be more resilient with other running tasks (like background indexing).
Comment 3 William Whittle CLA 2003-04-28 08:27:48 EDT
I see what you mean. Would calling Thread.yield() at various points do the 
trick? Would that yield control to threads outside the JVM so other processes 
get a chance to run? Or would that be dependent on the JVM using native threads 
(I'm not sure all common JVMs do that nowadays).
Comment 4 Kent Johnson CLA 2003-04-28 10:55:47 EDT
It is up to the OS on your machine to time-slice between different programs.

Thread.yield() is only helpful to the JVM to control its own threads, not other 
programs on your machine.

Full builds or any other extensive operation in Eclipse that is run in the main 
UI thread, will consume 100% of your CPU, if your machine's OS allows it.

Perhaps you should investigate switching the OS on your machine to Windows XP.

Closing.