Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9b43ecb

Browse files
fix(@angular-devkit/build-angular): reduce the number of max workers to available CPUs minus one
This commit reduces the maximum number of workers to the available CPUs minus 1. This adjustment ensures that some resources are left for the main thread, preventing it from being starved of CPU cycles. (cherry picked from commit 164c0d8)
1 parent 16f1c1e commit 9b43ecb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎packages/angular_devkit/build_angular/src/utils/environment-options.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const allowMinify = debugOptimize.minify;
7878
const maxWorkersVariable = process.env['NG_BUILD_MAX_WORKERS'];
7979
export const maxWorkers = isPresent(maxWorkersVariable)
8080
? +maxWorkersVariable
81-
: Math.min(4, availableParallelism());
81+
: Math.min(4, Math.max(availableParallelism()-1,1));
8282

8383
const parallelTsVariable = process.env['NG_BUILD_PARALLEL_TS'];
8484
export const useParallelTs = !isPresent(parallelTsVariable) || !isDisabled(parallelTsVariable);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /