Skip to content

perf(oxlint): align walker thread count with rayon pool#22494

Merged
graphite-app[bot] merged 1 commit into
mainfrom
perf/oxlint-walker-threads
May 17, 2026
Merged

perf(oxlint): align walker thread count with rayon pool#22494
graphite-app[bot] merged 1 commit into
mainfrom
perf/oxlint-walker-threads

Conversation

@Boshen

@Boshen Boshen commented May 17, 2026

Copy link
Copy Markdown
Member

Summary

  • The file walker (ignore::WalkParallel) was using its own default thread count (available_parallelism()), independent of rayon's pool size. When users pass --threads=N to lower rayon's count, the walker still silently spun up a full background pool, adding kernel pressure during the walk phase.
  • This brings oxlint in line with oxfmt, which already does the same: apps/oxfmt/src/cli/walk.rs:416.

Measurement

On a 72k-file repo (rolldown) on M3 Max, 8 runs per config:

Config Wall User Sys
--threads=14 (default) before 3.31 s 2.50 s 32.0 s
--threads=14 after 3.21 s 2.50 s 29.4 s
--threads=6 before 1.36 s 1.88 s 5.88 s
--threads=6 after 1.28 s 1.84 s 3.91 s

The win is largest when --threads is set below available_parallelism(): 33% sys-time reduction at --threads=6. At default threads it's a small consistency improvement (no behavior change since both pools were already at the same count).

🤖 Generated with Claude Code

@Boshen Boshen requested a review from camc314 as a code owner May 17, 2026 04:43
@github-actions github-actions Bot added A-linter Area - Linter A-cli Area - CLI labels May 17, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label May 17, 2026

camc314 commented May 17, 2026

Copy link
Copy Markdown
Contributor

Merge activity

## Summary

- The file walker (`ignore::WalkParallel`) was using its own default thread count (`available_parallelism()`), independent of rayon's pool size. When users pass `--threads=N` to lower rayon's count, the walker still silently spun up a full background pool, adding kernel pressure during the walk phase.
- This brings oxlint in line with oxfmt, which already does the same: `apps/oxfmt/src/cli/walk.rs:416`.

## Measurement

On a 72k-file repo (rolldown) on M3 Max, 8 runs per config:

| Config | Wall | User | Sys |
|---|---|---|---|
| `--threads=14` (default) before | 3.31 s | 2.50 s | 32.0 s |
| `--threads=14` after | 3.21 s | 2.50 s | 29.4 s |
| `--threads=6` before | 1.36 s | 1.88 s | 5.88 s |
| `--threads=6` after | **1.28 s** | 1.84 s | **3.91 s** |

The win is largest when `--threads` is set below `available_parallelism()`: 33% sys-time reduction at `--threads=6`. At default threads it's a small consistency improvement (no behavior change since both pools were already at the same count).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@graphite-app graphite-app Bot force-pushed the perf/oxlint-walker-threads branch from 5e89ea8 to 4c9ca72 Compare May 17, 2026 17:44
@graphite-app graphite-app Bot merged commit 4c9ca72 into main May 17, 2026
26 checks passed
@graphite-app graphite-app Bot deleted the perf/oxlint-walker-threads branch May 17, 2026 17:49
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label May 17, 2026
camc314 pushed a commit that referenced this pull request May 18, 2026
# Oxlint
### 🚀 Features

- 1ae291e linter/no-underscore-dangle: Add `allowInUsingDeclarations`
option (#22483) (吴杨帆)
- 0440b0f linter/eslint: Implement `id-match` rule (#22379) (Vladislav
Sayapin)
- 65bf119 linter: Implement react no-object-type-as-default-prop
(#22481) (uhyo)
- 2a6ddce linter/eslint: Implement `no-implied-eval` rule (#22391)
(Vladislav Sayapin)
- d3a3c1d linter: Auto detect agents from CLI and transition to the
agent output format (#22068) (Jovi De Croock)
- 625758a linter/vitest: Implement padding-around-after-all-blocks rule
(#21788) (kapobajza)
- 37680b0 linter: Implement react no-unstable-nested-components (#22248)
(Jovi De Croock)
- d8d9c74 linter: Implement import/newline-after-import rule (#19142)
(Ryuya Yanagi)

### 🐛 Bug Fixes

- 3f59e03 linter: Only call rayon/miette/tracing inits once (#21899)
(Matiss Janis Aboltins)
- 602dfd6 linter/promise/no-return-wrap: Detect Promise calls in all
branches (#22474) (zennnnnnn11)
- e182aee linter: Allow dialogs and popovers for no_autofocus (#22289)
(mehm8128)
- 7ffb710 linter/jest/vitest: Jest/no-standalone-expect ignores
additionalTestBlockFunctions option for jest/vitest hooks (#22477)
(kapobajza)
- c6f2d3f linter: Add more expression support for iframe-has-title
(#22460) (mehm8128)
- 5747ff1 linter: Avoid enabling jest with vitest plugin (#22499)
(camc314)
- 863984f linter/no-find-dom-node: Run on all files (#22479) (bab)

### ⚡ Performance

- 2afef79 linter: Optimize `no-loop-func` (#22491) (camchenry)
- 4c9ca72 oxlint: Align walker thread count with rayon pool (#22494)
(Boshen)

### 📚 Documentation

- f7967c7 linter/id-match: Clarify `onlyDeclarations` config docs
(#22523) (camc314)
- 1e0c97f linter: Fix closing code block in documentation for
`padding-around-after-all-blocks` rule. (#22513) (connorshea)
- a9049fd linter: Exclude directly provide autoFocus to dialog pattern
(#22510) (mehm8128)
# Oxfmt
### 🐛 Bug Fixes

- 8ee946f formatter/sort_imports: Use label to classify lines (#22512)
(leaysgur)
- 8c1da44 formatter: Normalize destructuring keys in DCR (#22478)
(camc314)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants