Skip to content

perf(transformer/refresh): remove temp Vec#10713

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-29-perf_transformer_refresh_remove_temp_vec_
Apr 30, 2025
Merged

perf(transformer/refresh): remove temp Vec#10713
graphite-app[bot] merged 1 commit intomainfrom
04-29-perf_transformer_refresh_remove_temp_vec_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Apr 30, 2025

Follow-on after #10656.

Remove the temporary Vec new_statements. Append new statements directly to program.body instead.

We get around the fact that the VariableDeclaration has to be inserted first by initially pushing a VariableDeclaration with no declarators, and then setting its declarators at the end.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-performance Category - Solution not expected to change functional behavior, only performance labels Apr 30, 2025
Copy link
Member Author

overlookmotel commented Apr 30, 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Apr 30, 2025

CodSpeed Instrumentation Performance Report

Merging #10713 will not alter performance

Comparing 04-29-perf_transformer_refresh_remove_temp_vec_ (9e557cf) with main (d8d8f64)

Summary

✅ 33 untouched benchmarks
🆕 3 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 linter[RadixUIAdoptionSection.jsx] N/A 2.7 ms N/A
🆕 linter[cal.com.tsx] N/A 1.2 s N/A
🆕 linter[checker.ts] N/A 3.1 s N/A

@graphite-app graphite-app bot changed the base branch from 04-29-refactor_transformer_refresh_do_not_unnecessarily_consume_vec_ to graphite-base/10713 April 30, 2025 10:11
@graphite-app graphite-app bot force-pushed the 04-29-perf_transformer_refresh_remove_temp_vec_ branch from ed96fdb to 47a0325 Compare April 30, 2025 10:18
@graphite-app graphite-app bot force-pushed the graphite-base/10713 branch from 7fd3575 to c4a5dba Compare April 30, 2025 10:18
@graphite-app graphite-app bot changed the base branch from graphite-base/10713 to main April 30, 2025 10:19
@graphite-app graphite-app bot force-pushed the 04-29-perf_transformer_refresh_remove_temp_vec_ branch from 47a0325 to 5c69b19 Compare April 30, 2025 10:19
@overlookmotel overlookmotel force-pushed the 04-29-perf_transformer_refresh_remove_temp_vec_ branch from 5c69b19 to b02d103 Compare April 30, 2025 10:41
@overlookmotel overlookmotel marked this pull request as ready for review April 30, 2025 11:20
@overlookmotel overlookmotel requested a review from Dunqing as a code owner April 30, 2025 11:20
Copy link
Member

@Dunqing Dunqing left a comment

Choose a reason for hiding this comment

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

Smart!

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Apr 30, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Apr 30, 2025

Merge activity

Follow-on after #10656.

Remove the temporary `Vec` `new_statements`. Append new statements directly to `program.body` instead.

We get around the fact that the `VariableDeclaration` has to be inserted first by initially pushing a `VariableDeclaration` with no declarators, and then setting its declarators at the end.
@graphite-app graphite-app bot force-pushed the 04-29-perf_transformer_refresh_remove_temp_vec_ branch from b02d103 to 9e557cf Compare April 30, 2025 12:10
@graphite-app graphite-app bot merged commit 9e557cf into main Apr 30, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 04-29-perf_transformer_refresh_remove_temp_vec_ branch April 30, 2025 12:16
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-transformer Area - Transformer / Transpiler 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.

2 participants