Skip to content

Commit

Permalink
Limit default number of JS workers to 4 (#9300)
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett committed Oct 9, 2023
1 parent f10e262 commit 5d875a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/workers/src/WorkerFarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ export default class WorkerFarm extends EventEmitter {
static getNumWorkers(): number {
return process.env.PARCEL_WORKERS
? parseInt(process.env.PARCEL_WORKERS, 10)
: Math.ceil(cpuCount() / 2);
: Math.min(4, Math.ceil(cpuCount() / 2));
}

static isWorker(): boolean {
Expand Down

0 comments on commit 5d875a2

Please sign in to comment.