Repository navigation
perf: use up to 6 threads by default - #1243
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 tasks done
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1243 +/- ##
=======================================
Coverage 93.99% 93.99%
=======================================
Files 301 301
Lines 31519 31520 +1
Branches 3216 3216
=======================================
+ Hits 29626 29627 +1
Misses 1871 1871
Partials 22 22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
View all previews: View all previews ↗ |
avivkeller
approved these changes
Nov 3, 2026
ovflowd
marked this pull request as ready for review
November 3, 2026 20:39
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 4, 2026 18:24
f1082fe to
4d830af
Compare
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 6, 2026 13:37
4d830af to
7e715a5
Compare
2 of 4 tasks
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 6, 2026 19:31
7e715a5 to
c97afb1
Compare
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 6, 2026 19:43
c97afb1 to
cf7e6c8
Compare
avivkeller
force-pushed
the
perf/six-threads
branch
from
November 9, 2026 02:26
cf7e6c8 to
fd18bd4
Compare
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 9, 2026 10:37
fd18bd4 to
5624386
Compare
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 9, 2026 11:03
5624386 to
c4b0dc4
Compare
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 20, 2026 21:45
ecb016b to
d35dd5c
Compare
bmuenzenmeyer
approved these changes
Nov 20, 2026
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 23, 2026 18:18
d35dd5c to
80f85f3
Compare
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 27, 2026 19:49
80f85f3 to
752f1bb
Compare
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 27, 2026 20:15
752f1bb to
8b55d18
Compare
avivkeller
force-pushed
the
perf/six-threads
branch
from
November 28, 2026 03:28
8b55d18 to
a632a90
Compare
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 28, 2026 21:29
a632a90 to
06fd956
Compare
ovflowd
force-pushed
the
perf/six-threads
branch
from
November 28, 2026 21:50
06fd956 to
bc94a37
Compare
With generators streaming into each other, more threads now pay off, so DEFAULT_MAX_THREADS goes from 4 to 6. On the Node.js API docs the site build is ~15% faster at 6 threads than at 4, for ~20% more memory; 8 threads were no faster than 6 and used ~15% more. Machines with fewer CPUs, like CI's 4, are unaffected, and --threads still sets any count. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com> Assisted-by: Claude Sonnet 5.5 <noreply@anthropic.com>
os.cpus() counts every CPU of the host, so in a container limited to 2 CPUs the default went from 4 workers to 6. os.availableParallelism() honours CPU affinity and quotas, and gives the same count elsewhere. The CLI docs said the default was up to 4 threads. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
avivkeller
force-pushed
the
perf/six-threads
branch
from
November 28, 2026 21:52
bc94a37 to
a5b491f
Compare
avivkeller
reviewed
Nov 28, 2026
Signed-off-by: Aviv Keller <me@aviv.sh>
avivkeller
approved these changes
Nov 28, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR makes builds use up to 6 threads by default, instead of 4. It's the last part of the stack that splits #1205. The CPUs are counted with
os.availableParallelism(), so a container's CPU limit lowers the default. Machines with fewer CPUs, like CI's 4, are unaffected, and--threadsstill sets any count.main8 threads were no faster than 6, and used ~15% more memory.
Validation
With
-p 1under--max-old-space-size=512, the site build still passed all 11 runs at ~1000MB peak, and legacy all 3 at 877MB.Related Issues
Refs: #1205, and nodejs/nodejs.org#9253, which caches tokens for both themes and makes the site build faster still.
Check List
node --run testand all tests passed.node --run format:check&node --run lint.