Skip to content

Comments

refactor(linter, mangler): get reference scope by reference.scope_id()#18059

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-16-refactor_linter_mangler_get_reference_scope_by_reference.scope_id_
Jan 19, 2026
Merged

refactor(linter, mangler): get reference scope by reference.scope_id()#18059
graphite-app[bot] merged 1 commit intomainfrom
01-16-refactor_linter_mangler_get_reference_scope_by_reference.scope_id_

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Jan 16, 2026

Simplify the use cases mentioned in #18053. After that PR, we can access the scope_id directly from the Reference, eliminating the need for an intermediate step to get the node first.

😅: I didn't expect there would be a lot of performance improvement in the Mangler.

@github-actions github-actions bot added A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 16, 2026
Copy link
Member Author

Dunqing commented Jan 16, 2026


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.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 16, 2026

Merging this PR will improve performance by 20.89%

⚡ 4 improved benchmarks
✅ 38 untouched benchmarks
⏩ 3 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation mangler[cal.com.tsx] 2.9 ms 2.4 ms +19.86%
Simulation mangler[RadixUIAdoptionSection.jsx] 13.1 µs 12.1 µs +8.14%
Simulation mangler[binder.ts] 719.2 µs 594.9 µs +20.89%
Simulation mangler[react.development.js] 258.3 µs 223.9 µs +15.34%

Comparing 01-16-refactor_linter_mangler_get_reference_scope_by_reference.scope_id_ (17591fa) with 01-16-feat_semantic_store_scope_id_in_reference (a4f011a)

Open in CodSpeed

Footnotes

  1. 3 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.

@Dunqing Dunqing changed the base branch from 01-16-feat_semantic_store_scope_id_in_reference to graphite-base/18059 January 19, 2026 01:58
@Dunqing Dunqing marked this pull request as ready for review January 19, 2026 02:07
@Dunqing Dunqing requested a review from camc314 as a code owner January 19, 2026 02:07
@Dunqing Dunqing force-pushed the graphite-base/18059 branch from 3ce0bac to a4f011a Compare January 19, 2026 02:16
@Dunqing Dunqing force-pushed the 01-16-refactor_linter_mangler_get_reference_scope_by_reference.scope_id_ branch from 7c4f44f to 17591fa Compare January 19, 2026 02:16
@Dunqing Dunqing changed the base branch from graphite-base/18059 to 01-16-feat_semantic_store_scope_id_in_reference January 19, 2026 02:16
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jan 19, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 19, 2026

Merge activity

…()` (#18059)

Simplify the use cases mentioned in #18053. After that PR, we can access the `scope_id` directly from the `Reference`, eliminating the need for an intermediate step to get the node first.

😅: I didn't expect there would be a lot of performance improvement in the Mangler.
graphite-app bot pushed a commit that referenced this pull request Jan 19, 2026
rolldown/rolldown#7936 relies on this. You can see how Rolldown uses this at description of that PR.

Additionally, it can also simplify the use case when you want to get the scope ID where the `Reference` occurs. See follow-up PR #18059
@graphite-app graphite-app bot force-pushed the 01-16-feat_semantic_store_scope_id_in_reference branch from a4f011a to e2221e6 Compare January 19, 2026 04:54
@graphite-app graphite-app bot requested a review from overlookmotel as a code owner January 19, 2026 04:54
@graphite-app graphite-app bot force-pushed the 01-16-refactor_linter_mangler_get_reference_scope_by_reference.scope_id_ branch from 17591fa to 727939f Compare January 19, 2026 04:54
Base automatically changed from 01-16-feat_semantic_store_scope_id_in_reference to main January 19, 2026 05:00
@graphite-app graphite-app bot merged commit 727939f into main Jan 19, 2026
22 checks passed
@graphite-app graphite-app bot deleted the 01-16-refactor_linter_mangler_get_reference_scope_by_reference.scope_id_ branch January 19, 2026 05:00
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant