swc-project / swc

Rust-based platform for the Web
https://swc.rs
Apache License 2.0
31.26k stars 1.23k forks source link

perf(es/plugin): Make `analyze_source_file` lazy, again #9732

Closed kdy1 closed 1 week ago

kdy1 commented 1 week ago

Description:

This reverts commit 772f023fd2f8bbcb336b0561a81621f0f1163622.

Related issue:

changeset-bot[bot] commented 1 week ago

🦋 Changeset detected

Latest commit: 1113fb98381c34e0385e78a7e37e7f797dfcb36f

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

codspeed-hq[bot] commented 1 week ago

CodSpeed Performance Report

Merging #9732 will improve performances by 9.37%

Comparing kdy1:common-lazy (1113fb9) with main (9b74ccd)

Summary

⚡ 11 improvements ✅ 183 untouched benchmarks

Benchmarks breakdown

Benchmark main kdy1:common-lazy Change
⚡ es/full/base/fixer 128.6 µs 117.6 µs +9.37%
âš¡ es/full/all/es2015 193.4 ms 185.2 ms +4.4%
âš¡ es/full/all/es2016 191.7 ms 183.9 ms +4.22%
âš¡ es/full/all/es2017 191.2 ms 183.2 ms +4.37%
âš¡ es/full/all/es2018 189.5 ms 181.7 ms +4.26%
âš¡ es/full/all/es2019 188.6 ms 180.8 ms +4.3%
âš¡ es/full/all/es2020 181.8 ms 173.8 ms +4.64%
âš¡ es/full/all/es3 258.1 ms 250 ms +3.25%
âš¡ es/full/all/es5 251.6 ms 243.2 ms +3.46%
âš¡ es/full/parser 1.5 ms 1.4 ms +8.56%
⚡ es/visitor/base-perf/boxing_unboxed_clone 2.6 µs 2.6 µs +3.43%