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

feat(es/minifier): Consider cost of functions for inlining #4470

Merged
merged 19 commits into from
Apr 29, 2022

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Apr 28, 2022

Description:

  • We now treat call expression as 'cheap enough to inline'.

Related issue (if exists):

@kdy1 kdy1 added this to the Planned milestone Apr 28, 2022
@kdy1
Copy link
Member Author

kdy1 commented Apr 28, 2022

cc @Austaras
I implemented simple ones based on your analysis, thank you!

Copy link
Member Author

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

swc-bump:

  • swc_ecma_minifier

@kdy1
Copy link
Member Author

kdy1 commented Apr 28, 2022

Oh, we need some sort of cost calculation.
I'll split this PR

@kdy1 kdy1 changed the title feat(es/minifier): Optimize react feat(es/minifier): Mark more expressions as simple Apr 28, 2022
@kdy1 kdy1 changed the title feat(es/minifier): Mark more expressions as simple feat(es/minifier): Calculate cost of simple functions Apr 28, 2022
@kdy1 kdy1 changed the title feat(es/minifier): Calculate cost of simple functions feat(es/minifier): Consider cost of functions for inlining Apr 28, 2022
@kdy1 kdy1 force-pushed the minifier-react branch 2 times, most recently from 437f151 to 0abb6a4 Compare April 29, 2022 04:56
@kdy1 kdy1 marked this pull request as ready for review April 29, 2022 05:21
kodiakhq[bot]
kodiakhq bot previously approved these changes Apr 29, 2022
@kdy1 kdy1 enabled auto-merge (squash) April 29, 2022 05:27
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

@kdy1 kdy1 merged commit 7a584d7 into swc-project:main Apr 29, 2022
@kdy1 kdy1 deleted the minifier-react branch April 29, 2022 05:59
@kdy1 kdy1 modified the milestones: Planned, v1.2.174 Apr 29, 2022
@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

None yet

2 participants