Skip to content

fix(es/minifier): Perform DCE on the end #10602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 12, 2025
Merged

fix(es/minifier): Perform DCE on the end #10602

merged 4 commits into from
Jun 12, 2025

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Jun 12, 2025

Description:

Expands the role of single-pass

Related issue:

@kdy1 kdy1 added this to the Planned milestone Jun 12, 2025
@kdy1 kdy1 self-assigned this Jun 12, 2025
Copy link

changeset-bot bot commented Jun 12, 2025

🦋 Changeset detected

Latest commit: 4f43ecb

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codspeed-hq bot commented Jun 12, 2025

CodSpeed Performance Report

Merging #10602 will create unknown performance changes

Comparing kdy1/download-counter (4f43ecb) with main (a97b149)

Summary

🆕 140 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 css/visitor/compare/clone N/A 5 ms N/A
🆕 css/visitor/compare/fold_span N/A 6 ms N/A
🆕 css/visitor/compare/fold_span_panic N/A 6 ms N/A
🆕 css/visitor/compare/visit_mut_span N/A 5.4 ms N/A
🆕 css/visitor/compare/visit_mut_span_panic N/A 5.4 ms N/A
🆕 css/lexer/bootstrap_5_1_3 N/A 11.2 ms N/A
🆕 css/lexer/foundation_6_7_4 N/A 9.1 ms N/A
🆕 css/lexer/tailwind_3_1_1 N/A 1.8 ms N/A
🆕 css/parser/bootstrap_5_1_3 N/A 48.6 ms N/A
🆕 css/parser/foundation_6_7_4 N/A 38.4 ms N/A
🆕 css/parser/tailwind_3_1_1 N/A 7.4 ms N/A
🆕 es/codegen/colors N/A 70.3 µs N/A
🆕 es/codegen/large N/A 644.1 µs N/A
🆕 es/codegen/with-parser/colors N/A 182.1 µs N/A
🆕 es/codegen/with-parser/large N/A 1.4 ms N/A
🆕 es/lexer/angular N/A 12.7 ms N/A
🆕 es/lexer/backbone N/A 1.8 ms N/A
🆕 es/lexer/cal-com N/A 34.9 ms N/A
🆕 es/lexer/colors N/A 44.6 µs N/A
🆕 es/lexer/jquery N/A 9.2 ms N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@kdy1 kdy1 marked this pull request as ready for review June 12, 2025 17:34
@kdy1 kdy1 requested review from a team as code owners June 12, 2025 17:34
kodiakhq[bot]
kodiakhq bot previously approved these changes Jun 12, 2025
kodiakhq[bot]
kodiakhq bot previously approved these changes Jun 12, 2025
@kdy1 kdy1 enabled auto-merge (squash) June 12, 2025 17:35
kodiakhq[bot]
kodiakhq bot previously approved these changes Jun 12, 2025
@kdy1 kdy1 disabled auto-merge June 12, 2025 18:21
@kdy1 kdy1 force-pushed the kdy1/download-counter branch from 17ad9df to 11eca45 Compare June 12, 2025 19:24
@kdy1 kdy1 force-pushed the kdy1/download-counter branch from 11eca45 to df5bed2 Compare June 12, 2025 19:49
kodiakhq[bot]
kodiakhq bot previously approved these changes Jun 12, 2025
kodiakhq[bot]
kodiakhq bot previously approved these changes Jun 12, 2025
@kdy1 kdy1 changed the title fix(es/minifier): Perform DCE on each step fix(es/minifier): Perform DCE on the end Jun 12, 2025
@kdy1 kdy1 force-pushed the kdy1/download-counter branch from aa6281f to 4f43ecb Compare June 12, 2025 20:47
@kdy1 kdy1 enabled auto-merge (squash) June 12, 2025 20:57
@kdy1 kdy1 disabled auto-merge June 12, 2025 21:03
@kdy1 kdy1 merged commit a97b149 into main Jun 12, 2025
166 checks passed
@kdy1 kdy1 deleted the kdy1/download-counter branch June 12, 2025 21:03
@kdy1 kdy1 modified the milestones: Planned, v1.12.1 Jun 12, 2025
kdy1 added a commit to vercel/next.js that referenced this pull request Jun 12, 2025
### What?

ChangeLog: swc-project/swc@[email protected][email protected]

This PR is expected to regress the build performance a bit but with much better minification rate for some edge cases.

### Why?

To apply 

 - swc-project/swc#10603
 - swc-project/swc#10604
 - swc-project/swc#10602
@swc-project swc-project locked as resolved and limited conversation to collaborators Jul 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Minifier does not remove unused classes.
1 participant