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(rspack_plugin_javascript): use Rayon to parse modules parallelly #6864

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

fi3ework
Copy link
Member

Summary

Improve perf issue introduced in #6697. Use Rayon to parallelly parse modules.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added the release: performance release: performance related release(mr only) label Jun 19, 2024
Copy link

netlify bot commented Jun 19, 2024

Deploy Preview for rspack ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f758726
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/66790436fb247d0008bee045
😎 Deploy Preview https://deploy-preview-6864--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@fi3ework
Copy link
Member Author

!bench

@rspack-bot
Copy link

rspack-bot commented Jun 19, 2024

📝 Benchmark detail: Open

Name Base (2024-06-19 35f8542) Current Change
10000_development-mode + exec 2.22 s ± 12 ms 2.23 s ± 25 ms +0.63 %
10000_development-mode_hmr + exec 732 ms ± 16 ms 705 ms ± 6.6 ms -3.72 %
10000_production-mode + exec 2.58 s ± 24 ms 2.55 s ± 33 ms -1.02 %
arco-pro_development-mode + exec 1.91 s ± 75 ms 1.93 s ± 78 ms +0.94 %
arco-pro_development-mode_hmr + exec 442 ms ± 1.9 ms 439 ms ± 2.9 ms -0.80 %
arco-pro_production-mode + exec 3.56 s ± 62 ms 3.48 s ± 58 ms -2.51 %
threejs_development-mode_10x + exec 1.47 s ± 19 ms 1.61 s ± 18 ms +9.77 %
threejs_development-mode_10x_hmr + exec 782 ms ± 6.8 ms 810 ms ± 7 ms +3.54 %
threejs_production-mode_10x + exec 4.77 s ± 21 ms 4.85 s ± 36 ms +1.64 %

Threshold exceeded: ["threejs_development-mode_10x + exec"]

@fi3ework
Copy link
Member Author

The performance regression relieved than before.

@fi3ework fi3ework requested a review from SyMind June 20, 2024 03:16
@fi3ework
Copy link
Member Author

!bench

@rspack-bot
Copy link

rspack-bot commented Jun 20, 2024

📝 Benchmark detail: Open

Name Base (2024-06-20 87a73c3) Current Change
10000_development-mode + exec 2.2 s ± 20 ms 2.24 s ± 39 ms +2.01 %
10000_development-mode_hmr + exec 714 ms ± 6.8 ms 717 ms ± 17 ms +0.33 %
10000_production-mode + exec 2.55 s ± 17 ms 2.57 s ± 28 ms +1.06 %
arco-pro_development-mode + exec 1.9 s ± 95 ms 1.92 s ± 81 ms +0.96 %
arco-pro_development-mode_hmr + exec 438 ms ± 2.1 ms 439 ms ± 2.8 ms +0.10 %
arco-pro_production-mode + exec 3.43 s ± 51 ms 3.49 s ± 103 ms +1.81 %
threejs_development-mode_10x + exec 2.05 s ± 7 ms 1.61 s ± 21 ms -21.19 %
threejs_development-mode_10x_hmr + exec 810 ms ± 6.7 ms 809 ms ± 10 ms -0.18 %
threejs_production-mode_10x + exec 5.27 s ± 32 ms 4.85 s ± 26 ms -7.88 %

fix: error handle

perf: use Identifier insead of String as key
@fi3ework
Copy link
Member Author

!bench

@rspack-bot
Copy link

⏳ Triggered benchmark: Open

@fi3ework
Copy link
Member Author

!bench

@rspack-bot
Copy link

rspack-bot commented Jun 24, 2024

📝 Benchmark detail: Open

Name Base (2024-06-20 5839629) Current Change
10000_development-mode + exec 2.21 s ± 12 ms 2.18 s ± 18 ms -1.50 %
10000_development-mode_hmr + exec 714 ms ± 9.7 ms 701 ms ± 10 ms -1.80 %
10000_production-mode + exec 2.77 s ± 28 ms 2.65 s ± 22 ms -4.18 %
arco-pro_development-mode + exec 1.9 s ± 78 ms 1.9 s ± 61 ms -0.33 %
arco-pro_development-mode_hmr + exec 439 ms ± 0.92 ms 435 ms ± 1.7 ms -0.97 %
arco-pro_production-mode + exec 3.47 s ± 86 ms 3.43 s ± 77 ms -1.33 %
threejs_development-mode_10x + exec 2.06 s ± 21 ms 1.61 s ± 12 ms -22.21 %
threejs_development-mode_10x_hmr + exec 812 ms ± 4.1 ms 802 ms ± 9 ms -1.24 %
threejs_production-mode_10x + exec 5.33 s ± 24 ms 4.8 s ± 26 ms -9.96 %

@fi3ework fi3ework requested a review from ahabhgk June 24, 2024 12:03
@ahabhgk ahabhgk merged commit a2c264e into web-infra-dev:main Jun 25, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: performance release: performance related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants