Repository navigation
perf(build): size -b --fast builders and checkers to the machine - #1228
Merged
maschwenk merged 1 commit intoDec 2, 2026
Merged
Conversation
maschwenk
force-pushed
the
max/build-fast-builder-budget
branch
from
December 2, 2026 15:29
2aad3d8 to
6c61156
Compare
`tsrs -b` ran 4 builders and gave every project 4 checkers on any machine. With `--fast`, the builder count now comes from the cores (the core count up to 8 or a quarter of the cores, whichever is greater, 4 to 16), and each project gets one checker per 32 checked files, at least one per 8 cores (1-4) and at most what `--fast` gives a program checked alone. A builder starts compiling a project only when the checkers estimated for the projects being compiled stay within 2 per core, so a graph of large projects builds fewer of them at once. A project's checker count depends only on the machine and the project, never on scheduling. Without `--fast`, `-b` keeps Go's 4 builders and 4 checkers per project. `--builders`, `--checkers` and `--singleThreaded` still override the defaults, and giving either count turns the machine sizing off, so the other stays at 4. Measured with cold `-b --force` on a 32-core Graviton box, with 4-16 cores emulated by CPU affinity (notes/perf-build-fast-defaults.md): the issue's 62-project Vue monorepo took 17%, 6%, 8% and 25% less wall time at 4, 8, 16 and 32 cores, and a 1,500-file project among 40 small ones 33-60% less at 8-32 cores. Peak memory ranges from -39% at 4 cores to +72% for a large single project at 32 cores. Fixes oxc-project#1223
maschwenk
force-pushed
the
max/build-fast-builder-budget
branch
from
December 2, 2026 15:39
6c61156 to
7e05e1e
Compare
maschwenk
marked this pull request as ready for review
December 2, 2026 15:39
maschwenk
enabled auto-merge
December 2, 2026 15:40
Contributor
Merging this PR will not alter performanceWarning oxc-project has exceeded the Hobby plan limit of 5 active contributors. Upgrade your plan or apply to the open source program by December 8, 2026 to keep using CodSpeed. 1 warning
Comparing Footnotes
|
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.
tsrs -bran 4 builders and 4 checkers per project on any machine. on #1223's 62-project vue monorepo, each small project's 4 checkers rebuild the same shared types (40% more instructions than 1 checker) and 4 builders can't fill 32 cores. a 1,500-file project that the rest waits for also gets only 4 checkers. with--fast, builders come from the cores (the core count up to 8 or a quarter of the cores, whichever is greater, 4 to 16). each project gets one checker per 32 checked files, at least one per 8 cores (1 to 4) and at most what--fastgives a program checked alone. a builder starts compiling a project only when the checkers estimated for the projects in flight stay within 2 per core, so fewer big projects build at once. counts depend only on the machine and the project, never on scheduling. without--fastnothing changes.-bkeeps go's 4 x 4, and diagnostics, emitted files, build info and counters are byte-identical to main.--builders,--checkersand--singleThreadedstill override the defaults. giving either count turns the machine sizing off, so the other stays at 4the cost is memory at 16-32 cores, mostly because a big project gets the checkers
--fastgives a lone program (lobehub +72% at 32 cores). graphs of many 250-file projects run 3-4% slower on 4-8 cores for 27-36% less memory. tests cover the rule's table, the builder count in each mode and with--checkersalone, a non-fast build reporting exactly the--checkers 4counters, and--fast --builderskeeping 4 checkers per project. per-project times in--extendedDiagnostics, the issue's second ask, are left for a follow-up. numbers are cold-b --force --fast, main vs this branch, on anm8g.8xlargewith fewer cores emulated by cpu affinity. fixtures are on a ram disk, medians of 5 (catalog projects 3). sweeps, solution generation and an x86 run are innotes/perf-build-fast-defaults.md-b src --noEmitFixes #1223