perf(napi/parser, oxlint/plugins): shorten deserializer for WithClause#20575
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR optimizes WithClause handling in the AST transfer pipeline by avoiding unnecessary span/range materialization during (de)serialization, reducing work in both Rust ESTree serialization and JS raw-transfer deserializers.
Changes:
- Remove
WithClausespan serialization from Rust ESTree output. - Simplify JS raw-transfer deserializers to stop reading/constructing
start/end/rangeforWithClause. - Remove
start/endaccessors and JSON fields from the lazy raw-transferWithClauseconstructor.
Reviewed changes
Copilot reviewed 1 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| napi/parser/src-js/generated/lazy/constructors.js | Drops WithClause start/end getters and omits them from toJSON() to reduce lazy materialization work. |
| napi/parser/src-js/generated/deserialize/ts_range_parent.js | Simplifies deserializeWithClause to only return attributes. |
| napi/parser/src-js/generated/deserialize/ts_range.js | Simplifies deserializeWithClause to only return attributes. |
| napi/parser/src-js/generated/deserialize/ts_parent.js | Simplifies deserializeWithClause to only return attributes. |
| napi/parser/src-js/generated/deserialize/ts.js | Simplifies deserializeWithClause to only return attributes. |
| napi/parser/src-js/generated/deserialize/js_range_parent.js | Simplifies deserializeWithClause to only return attributes. |
| napi/parser/src-js/generated/deserialize/js_range.js | Simplifies deserializeWithClause to only return attributes. |
| napi/parser/src-js/generated/deserialize/js_parent.js | Simplifies deserializeWithClause to only return attributes. |
| napi/parser/src-js/generated/deserialize/js.js | Simplifies deserializeWithClause to only return attributes. |
| crates/oxc_ast/src/generated/derive_estree.rs | Removes serialize_span(self.span) from WithClause ESTree serialization. |
| crates/oxc_ast/src/ast/js.rs | Marks WithClause.span with #[estree(skip)] to avoid emitting it. |
| apps/oxlint/src-js/generated/deserialize.js | Simplifies deserializeWithClause to only return attributes in oxlint’s raw-transfer deserializer. |
Merge activity
|
…se` (#20575) Small optimization to ESTree serialization and raw transfer. Shave off a little work when serializing/deserializing `WithClause`.
5723ee4 to
d176ecc
Compare
…se` (oxc-project#20575) Small optimization to ESTree serialization and raw transfer. Shave off a little work when serializing/deserializing `WithClause`.

Small optimization to ESTree serialization and raw transfer. Shave off a little work when serializing/deserializing
WithClause.