Repository navigation
perf: hand Biome and oxlint every file at once - #387
alexander-akait wants to merge 1 commit into
Conversation
One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via: Supported
Alternatively, if the co-author should not be included, remove the Please update your commit message(s) by doing |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 25 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #387 +/- ##
==========================================
+ Coverage 99.62% 99.64% +0.01%
==========================================
Files 19 19
Lines 5400 5626 +226
==========================================
+ Hits 5380 5606 +226
Misses 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
EasyCLA fails because the commits carry a This PR is stacked on #377 and should land after it. Generated by Claude Code |
Each lint of the Biome and oxlint checks is a process of its own that reads the configuration and, for Biome, the project again. Handed in batches of 64 while webpack built, a build of 1,500 files started 16-21 of them, two at a time. Both adapters now say `lintsOnce` (#377), so they are handed every file when the module graph is done: 4 processes, one at a time. 1,500 files, one-shot, CPU of the processes the build started: Biome 2.9-3.0 s -> 2.15-2.2 s, oxlint 1.2-1.7 s -> 0.26-0.31 s. Wall time unchanged (within noise). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01App18sYbe6Vf6HDCjCXbvf
0b3e404 to
8a9d5ed
Compare
Part of the performance series (#376–#386). Builds on #377 (the
lintsOnceadapter hook), so this branch contains #377's commit and should land after it; the diff of its own is the last commit.Problem
While webpack builds, the plugin hands a check its files in batches of 64, so the check can start early. For Biome and oxlint every batch is a process of its own, and each one:
A one-shot build of 1,500 files started 16–21 of these processes, up to two at once, each wanting every core.
Change
Both adapters now say
lintsOnce: () => true(the hook from #377), so they're handed every file once the module graph is done. That's one process per 500 files: 4 processes, one at a time. Watch rebuilds are unchanged, since they're a handful of files anyway.Measured
1,500
.tsfiles,compiler.run. CPU is measured from/proc/self/stat, separating webpack's own process from the processes it started and waited for. Two runs each:mainmainWall time is within noise: the processes ran alongside webpack before, and now run after it. The CPU the tools spend drops by a quarter for Biome and by about 80% for oxlint.
Tests
test/lints-once.test.jschecks that both adapters say they lint once. The mechanism itself is covered by perf: hand ESLint every file at once when it threads the lint itself #377's test.eslint,tsc, prettier, cspell andlint:schemaare clean.Generated by Claude Code