Skip to content

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Aug 24, 2025

Added substitute_single_use_symbol_in_statement calls to other statements like esbuild does.

Copy link
Member Author

sapphi-red commented Aug 24, 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.

Copy link

codspeed-hq bot commented Aug 24, 2025

CodSpeed Instrumentation Performance Report

Merging #13277 will degrade performances by 7.21%

Comparing 08-24-feat_minifier_support_more_statements_for_single_use_variable_inlining (a951eee) with main (e7a49ed)1

Summary

❌ 1 regressions
✅ 33 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
minifier[react.development.js] 2.1 ms 2.3 ms -7.21%

Footnotes

  1. No successful run was found on 08-24-feat_minifier_support_more_expressions_for_single_use_variable_inlining (dcda3a2) during the generation of this report, so main (e7a49ed) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@sapphi-red sapphi-red force-pushed the 08-24-feat_minifier_support_more_expressions_for_single_use_variable_inlining branch from b70e401 to 62e38f5 Compare August 24, 2025 06:04
@sapphi-red sapphi-red force-pushed the 08-24-feat_minifier_support_more_statements_for_single_use_variable_inlining branch from 1dac1a4 to 17cf2c7 Compare August 24, 2025 06:04
@sapphi-red sapphi-red force-pushed the 08-24-feat_minifier_support_more_statements_for_single_use_variable_inlining branch from 17cf2c7 to 45df7a8 Compare August 24, 2025 06:39
@sapphi-red sapphi-red force-pushed the 08-24-feat_minifier_support_more_expressions_for_single_use_variable_inlining branch 2 times, most recently from 95082cd to da5d1f9 Compare August 24, 2025 06:43
@sapphi-red sapphi-red force-pushed the 08-24-feat_minifier_support_more_statements_for_single_use_variable_inlining branch from 45df7a8 to 9e407ff Compare August 24, 2025 06:43
@sapphi-red sapphi-red marked this pull request as ready for review August 24, 2025 07:03
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Aug 24, 2025
Copy link
Contributor

graphite-app bot commented Aug 24, 2025

Merge activity

…ing (#13277)

Added `substitute_single_use_symbol_in_statement` calls to other statements like esbuild does.
@graphite-app graphite-app bot force-pushed the 08-24-feat_minifier_support_more_expressions_for_single_use_variable_inlining branch from da5d1f9 to dcda3a2 Compare August 24, 2025 08:45
@graphite-app graphite-app bot force-pushed the 08-24-feat_minifier_support_more_statements_for_single_use_variable_inlining branch from 9e407ff to a951eee Compare August 24, 2025 08:46
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 24, 2025
Base automatically changed from 08-24-feat_minifier_support_more_expressions_for_single_use_variable_inlining to main August 24, 2025 08:53
@graphite-app graphite-app bot merged commit a951eee into main Aug 24, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 08-24-feat_minifier_support_more_statements_for_single_use_variable_inlining branch August 24, 2025 08:54
graphite-app bot pushed a commit that referenced this pull request Sep 14, 2025
#13755)

Inline single use variables in for statements:
```js
function wrapper1() { var x = foo; for (var i = x; i < 10; i++) console.log(i) }
function wrapper2() { var i, x = foo; for (i = x; i < 10; i++) console.log(i) }
// to
function wrapper1() { for (var i = foo; i < 10; i++) console.log(i) }
function wrapper2() { var i; for (i = foo; i < 10; i++) console.log(i) }
```
```js
function wrapper() { var x = {}; for (var a in x) console.log(a) }
// to
function wrapper() { for (var a in {}) console.log(a) }
```
```js
function wrapper() { var x = []; for (var a of x) console.log(a) }
// to
function wrapper() { for (var a of []) console.log(a) }
```

refs #13277
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-minifier Area - Minifier C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant