mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
Bug 398426 - Use num procs - 1 on Mac for optimal parallel builds.
Changed the text of the UI since optimal is not always number of processors.
This commit is contained in:
parent
6aebe7dcd5
commit
4b22b8c6bc
2 changed files with 8 additions and 2 deletions
|
@ -2522,7 +2522,13 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
* The function never returns number smaller than 1.
|
||||
*/
|
||||
public int getOptimalParallelJobNum() {
|
||||
return Runtime.getRuntime().availableProcessors();
|
||||
// Bug 398426: On my Mac running parallel builds at full tilt hangs the desktop.
|
||||
// Need to pull it back one.
|
||||
int j = Runtime.getRuntime().availableProcessors();
|
||||
if (j > 1 && Platform.getOS().equals(Platform.OS_MACOSX))
|
||||
return j - 1;
|
||||
else
|
||||
return j;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,7 +32,7 @@ BuilderSettingsTab_8=&Expand Env. Variable Refs in Makefiles
|
|||
BuilderSettingsTab_9=Build settings
|
||||
BuilderSettingsTab_10=Stop on first build error
|
||||
BuilderSettingsTab_EnableParallelBuild=Enable parallel build
|
||||
BuilderSettingsTab_UseOptimalJobs=Use number of processors ({0})
|
||||
BuilderSettingsTab_UseOptimalJobs=Use optimal jobs ({0})
|
||||
BuilderSettingsTab_UseParallelJobs=Use parallel jobs:
|
||||
BuilderSettingsTab_UseUnlimitedJobs=Use unlimited jobs
|
||||
BuilderSettingsTab_14=Workbench Build Behavior
|
||||
|
|
Loading…
Add table
Reference in a new issue