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

perf(es/typescript): Reduce unnecessary visits #9605

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

magic-akari
Copy link
Member

No description provided.

@magic-akari magic-akari requested a review from a team as a code owner October 2, 2024 05:49
Copy link

changeset-bot bot commented Oct 2, 2024

🦋 Changeset detected

Latest commit: ed09efe

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

@kdy1 kdy1 requested a review from a team as a code owner October 2, 2024 06:09
@kdy1 kdy1 self-assigned this Oct 2, 2024
@kdy1 kdy1 added this to the v1.7.29 milestone Oct 2, 2024
@kdy1 kdy1 enabled auto-merge (squash) October 2, 2024 06:09
@kdy1 kdy1 disabled auto-merge October 2, 2024 06:23
@kdy1 kdy1 merged commit 866af6c into swc-project:main Oct 2, 2024
153 checks passed
@magic-akari
Copy link
Member Author

visit_mut_module_items is not only called in es modules but also in ts modules.
Moving the related methods to visit_mut_module ensures that our UsageCollect and DeclareCollect are called only once.

@magic-akari magic-akari deleted the perf/typescript branch October 2, 2024 06:33
Copy link

codspeed-hq bot commented Oct 2, 2024

CodSpeed Performance Report

Merging #9605 will degrade performances by 9.5%

Comparing magic-akari:perf/typescript (ed09efe) with main (2f06fc5)

Summary

⚡ 1 improvements
❌ 13 regressions
✅ 180 untouched benchmarks

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

Benchmarks breakdown

Benchmark main magic-akari:perf/typescript Change
es/full/bugs-1 560.3 µs 512.7 µs +9.28%
es/oxc/benches/assets/UserSettings.tsx/sourceMap=false/reactDev=true 1.4 ms 1.4 ms -3.14%
es/oxc/benches/assets/table.tsx/sourceMap=false/reactDev=false 7.2 ms 7.5 ms -3.03%
es/full/codegen/es2016 262.2 µs 285 µs -8.02%
es/full/codegen/es2017 253.7 µs 280.3 µs -9.5%
es/full/codegen/es2018 258.3 µs 280.9 µs -8.06%
es/full/codegen/es2019 253.9 µs 277.8 µs -8.63%
es/full/codegen/es2020 258.2 µs 280.8 µs -8.06%
es/full/codegen/es3 254.9 µs 277.4 µs -8.11%
es/full/codegen/es5 255.4 µs 278 µs -8.11%
es/codegen/colors 70.3 µs 76 µs -7.55%
es/codegen/large 682.9 µs 745.5 µs -8.4%
es/codegen/with-parser/colors 200.7 µs 207.1 µs -3.07%
es/codegen/with-parser/large 1.5 ms 1.6 ms -4.19%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants