Skip to content
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

fix(es/minifier): Fix performance issues & bugs #1988

Closed
wants to merge 84 commits into from

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Jul 31, 2021

swc_ecma_codegen:

swc_ecma_minfiier:

swc_ecma_transforms_optimization:

  • expr_simplifier: Prevent infinite loops.

Performance

  • negate_cost: Currently, the same expression is negated multiple times, although it should be blocked by negate_cost. This impacts performance dramatically. Also, some tests fail because of this.

  • Reallocation of analyzer. I profiled antd case and I found that it's quite frequent.

@kdy1 kdy1 added this to the v1.2.71 milestone Jul 31, 2021
@kdy1 kdy1 changed the title fix(es/minifier): Fix performance bugs fix(es/minifier): Fix performance issues & bugs Aug 1, 2021
@kdy1 kdy1 closed this Aug 2, 2021
@kdy1 kdy1 deleted the minifier-perf branch August 9, 2021 15:57
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 8, 2022
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: slower than terser codegen: less whitespace and unneeded punctuation
1 participant