perf(linter/react-exhaustive-deps): use stack of AstTypes instead of AstKinds#8522
Merged
graphite-app[bot] merged 1 commit intomainfrom Jan 16, 2025
Conversation
Member
Author
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. |
CodSpeed Performance ReportMerging #8522 will not alter performanceComparing Summary
|
camc314
approved these changes
Jan 16, 2025
Member
Author
Merge activity
|
Member
Author
|
Thanks for reviewing! |
…f `AstKind`s (#8522) This lint rule keeps a stack tracing the "visitation path" during `Visit`. Only the type of the nodes is used, not their values, so store only `AstType` (1 byte) rather than `AstKind` (16 bytes). This should be more performant, but the main motivation is #8461. This is one of very few places in the codebase which uses `enter_node` and `leave_node`. Not storing `AstKind`s here clears the way to remove the unsound lifetime extension in `Visit::alloc`.
6c38ea1 to
a6d71f8
Compare
770a05c to
250bbd1
Compare
Boshen
added a commit
that referenced
this pull request
Jan 19, 2025
## [0.15.7] - 2025-01-19 ### Features - 01ac773 linter: Support `ignoreTypeOfTestName` for `jest/valid-title` (#8589) (dalaoshu) - 538b24a linter: Format the configuration documentation correctly (#8583) (Tapan Prakash) - 7ab14cc linter: Add more Vitest compatible Jest rules (#8445) (Anson Heung) - d178360 linter: Implement `eslint/prefer-promise-reject-errors` (#8254) (tbashiyy) - 4ac2e99 oxlint: Implement `--init` cli option (#8453) (Tapan Prakash) ### Bug Fixes - 855c839 codegen: Shorthand assignment target identifier consider mangled names (#8536) (Boshen) - c15af02 linter: False positive in `eslint/no-lone-blocks` (#8587) (dalaoshu) - 41f2070 linter: Rule `no-restricted-imports` support missing options (#8076) (Alexander S.) - 869bc73 linter: Enhance `default_param_last` rule to handle optional parameters (#8563) (Tapan Prakash) - c6260c2 linter: Support rest params for `prefer_promise_reject_errors` (#8468) (Yuichiro Yamashita) - 2be1e82 linter/no-unused-vars: False positives when variable and type have same name (#8465) (Dunqing) ### Performance - 250bbd1 linter/react-exhaustive-deps: Use stack of `AstType`s instead of `AstKind`s (#8522) (overlookmotel) ### Refactor - 40f5165 linter: Improve `eslint/no-lone-blocks` (#8588) (dalaoshu) - b4c87e2 linter: Move DiagnosticsReporters to oxlint (#8454) (Alexander S.) - bf00f82 linter: Move rule `prefer-each` from vitest to jest + remapping (#8448) (Alexander S.) - 8dd0013 linter/consistent-function-scoping: Remove `Visit::enter_node` usage (#8538) (overlookmotel) - 30c0689 linter/no-map-spread: Remove `Visit::enter_node` usage (#8537) (overlookmotel) - b5ed58e span: All methods take owned `Span` (#8297) (overlookmotel) ### Styling - 3789d2f linter/react-exhaustive-deps: Fix indentation (#8520) (overlookmotel) Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
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.

This lint rule keeps a stack tracing the "visitation path" during
Visit. Only the type of the nodes is used, not their values, so store onlyAstType(1 byte) rather thanAstKind(16 bytes).This should be more performant, but the main motivation is oxc-project/backlog#160. This is one of very few places in the codebase which uses
enter_nodeandleave_node. Not storingAstKinds here clears the way to remove the unsound lifetime extension inVisit::alloc.