Avatar for the oxc-project user
oxc-project
oxc
BlogDocsChangelog

Performance History

Latest Results

perf(isolated-declarations): replace hash collections with index-based Vec (#19221) ## Summary - Eliminate redundant `transformed_spans: FxHashSet<Span>` by consolidating passthrough cases into `transformed_stmts` - Replace `transformed_stmts: FxHashMap<Span, Statement>` with `Vec<Option<Statement>>` indexed by statement position for O(1) lookups - Merge `get_assignable_properties_for_namespaces` into `report_error_for_expando_function` as a single forward pass **Benchmark (vue-id.ts):** 8.53ms โ†’ 6.57ms (**~23% faster**) ## Test plan - [x] `cargo test -p oxc_isolated_declarations` โ€” all 20 tests pass - [x] `cargo clippy` โ€” no warnings - [x] `cargo bench -p oxc_benchmark --bench transformer -- isolated-declarations` ๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code)
main
39 minutes ago
semantic: assign ast node ids during semantic build Entire-Checkpoint: a4f3fdbfe5b0
02-11-semantic_assign_ast_node_ids_during_semantic_build_entire-checkpoint_a4f3fdbfe5b0
41 minutes ago
fix(linter): recognize module-scoped callback refs as stable in exhaustive-deps (#19220) Fix an `exhaustive-deps` divergence from ESLint's `eslint-plugin-react-hooks`: module-scoped function references passed as callbacks (e.g. `useMemo(getColumns, [])`) are not recognized as stable. --- ### Details Consider this pattern: ```js function getColumns() { return []; } // module scope function MyComponent() { const columns = useMemo(getColumns, []); // oxlint false positive } ``` `getColumns` is defined at module scope โ€” it never changes between renders. ESLint correctly recognizes this and doesn't report missing dependencies. Oxlint was reporting a false positive. <details> <summary>Why? (explained by Claude Opus 4.6)</summary> When the callback to `useMemo` is an identifier rather than an inline arrow, the rule enters [this branch](https://github.com/oxc-project/oxc/blob/1b2f354/crates/oxc_linter/src/rules/react/exhaustive_deps.rs#L330-L400): 1. It calls `get_declaration_of_variable(ident, ...)` to resolve where `getColumns` is defined โ€” this finds the declaration **regardless of scope** 2. It sees `AstKind::Function` and wraps it as `CallbackNode::Function`, treating the body as if it were an inline callback 3. It walks the function body with `ExhaustiveDepsVisitor`, collecting all identifier references as "found dependencies" 4. It compares those against the declared `[]` empty array and reports mismatches The problem: between step 1 and 2, there was no check for whether the declaration is even inside the component. The rule already has this exact check for the inline-callback path โ€” [`is_identifier_a_dependency`](https://github.com/oxc-project/oxc/blob/1b2f354/crates/oxc_linter/src/rules/react/exhaustive_deps.rs#L932-L954) returns `false` when `declaration.scope_id() != component_scope_id`. The function-reference-as-callback path just never had this gate. </details> The fix adds a scope check before analyzing the resolved function body: ```rust if let Some(decl) = get_declaration_of_variable(ident, ctx.semantic()) { // NEW: module-scoped declarations are stable if decl.scope_id() != component_scope_id { return; } // ... existing body analysis logic } ``` Also see: https://github.com/oxc-project/oxc/pull/19254 --------- Co-authored-by: Cameron Clark <cameron.clark@hey.com>
main
1 hour ago
u
sreetamdas:fix/react-hooks-digit-names-and-module-scoped-deps
2 hours ago

Active Branches

semantic: assign ast node ids during semantic build Entire-Checkpoint: a4f3fdbfe5b0
last run
41 minutes ago
#19263
CodSpeed Performance Gauge
-6%
#18138
CodSpeed Performance Gauge
-1%
ยฉ 2026 CodSpeed Technology
Home Terms Privacy Docs