Skip to content

Conversation

@camchenry
Copy link
Member

@camchenry camchenry commented Oct 15, 2025

Previously, we bailed out on node.kind().as_member_expression_kind() diverging let statements. Now, we can compute those member expression kinds as they should be relatively constant.

+1-3% on the linter benchmarks, plus we just dropped sub-millisecond on the Radix UI benchmark!

Screenshot 2025-10-15 at 5 11 00 PM

Copy link
Member Author

camchenry commented Oct 15, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added A-linter Area - Linter C-performance Category - Solution not expected to change functional behavior, only performance labels Oct 15, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 15, 2025

CodSpeed Performance Report

Merging #14642 will not alter performance

Comparing 10-15-perf_linter_support_getting_as_member_expression_kind_variants (73f2cbb) with main (6bb9902)

Summary

✅ 4 untouched
⏩ 33 skipped1

Footnotes

  1. 33 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@camchenry camchenry marked this pull request as ready for review October 15, 2025 21:11
@camchenry camchenry requested a review from camc314 as a code owner October 15, 2025 21:11
@graphite-app graphite-app bot changed the base branch from 10-15-perf_linter_only_check_for_call_expr_once_in_unicorn_no-array-method-this_ to graphite-base/14642 October 15, 2025 21:12
@graphite-app graphite-app bot force-pushed the 10-15-perf_linter_support_getting_as_member_expression_kind_variants branch from 35c0726 to 66dcfe2 Compare October 15, 2025 21:17
@graphite-app graphite-app bot force-pushed the graphite-base/14642 branch from 44bc4df to 58e17ae Compare October 15, 2025 21:17
@graphite-app graphite-app bot changed the base branch from graphite-base/14642 to main October 15, 2025 21:17
@graphite-app graphite-app bot force-pushed the 10-15-perf_linter_support_getting_as_member_expression_kind_variants branch from 66dcfe2 to a5c8354 Compare October 15, 2025 21:17
@camc314 camc314 self-assigned this Oct 15, 2025
Copilot AI review requested due to automatic review settings October 15, 2025 22:25
@camc314 camc314 force-pushed the 10-15-perf_linter_support_getting_as_member_expression_kind_variants branch from a5c8354 to 1a6c6fa Compare October 15, 2025 22:25
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Oct 15, 2025
Copy link
Contributor

camc314 commented Oct 15, 2025

Merge activity

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Support extraction of variants from node.kind().as_member_expression_kind(), enabling the linter codegen to handle these cases without diverging let statements and improving performance.

  • Add extraction of multiple variants via extract_variants_from_as_call returning NodeTypeSet
  • Parse crates/oxc_ast/src/ast_kind_impl.rs at runtime to compute member expression kinds
  • Introduce helper self_astkind_variant_from_path and use find_impl_function to locate the impl fn

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@camchenry camchenry force-pushed the 10-15-perf_linter_support_getting_as_member_expression_kind_variants branch from 1a6c6fa to eb833e6 Compare October 16, 2025 01:51
…14642)

Previously, we bailed out on `node.kind().as_member_expression_kind()` diverging `let` statements. Now, we can compute those member expression kinds as they should be relatively constant.

+1-3% on the linter benchmarks, plus we just dropped sub-millisecond on the Radix UI benchmark!

<img width="719" height="427" alt="Screenshot 2025-10-15 at 5 11 00 PM" src="https://github.com/user-attachments/assets/a15d4a28-ad79-447a-9025-69368474a40e" />
@graphite-app graphite-app bot force-pushed the 10-15-perf_linter_support_getting_as_member_expression_kind_variants branch from eb833e6 to 73f2cbb Compare October 16, 2025 01:57
@graphite-app graphite-app bot merged commit 73f2cbb into main Oct 16, 2025
20 checks passed
@graphite-app graphite-app bot deleted the 10-15-perf_linter_support_getting_as_member_expression_kind_variants branch October 16, 2025 02:02
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-performance Category - Solution not expected to change functional behavior, only performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants