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: improve performance of eval-source-map #7630

Merged
merged 1 commit into from
Aug 21, 2024
Merged

perf: improve performance of eval-source-map #7630

merged 1 commit into from
Aug 21, 2024

Conversation

JSerFeng
Copy link
Collaborator

@JSerFeng JSerFeng commented Aug 20, 2024

Summary

using simd_json to convert string to json string, the improvement is small, but better than current, especially if the number of modules is super large.

encoding url always allocate new string, but in most cases there is no replacement at all, so using Cow to avoid unnessary allocation here.

here is the improvement I saw with my MacBook Pro M1, using this repo, CASE=9000

Before

image

After

image

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 Aug 20, 2024
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Aug 20, 2024
Copy link

netlify bot commented Aug 20, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 6766822
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/66c5af0d0c64b3000863ffba

@JSerFeng
Copy link
Collaborator Author

!bench

@rspack-bot
Copy link

rspack-bot commented Aug 20, 2024

📝 Benchmark detail: Open

Name Base (2024-08-20 46c0de9) Current Change
10000_development-mode + exec 2.36 s ± 21 ms 2.35 s ± 18 ms -0.49 %
10000_development-mode_hmr + exec 703 ms ± 6.6 ms 710 ms ± 4.4 ms +0.91 %
10000_production-mode + exec 3.02 s ± 31 ms 3.04 s ± 35 ms +0.77 %
arco-pro_development-mode + exec 1.9 s ± 92 ms 1.94 s ± 60 ms +2.30 %
arco-pro_development-mode_hmr + exec 437 ms ± 1.6 ms 437 ms ± 1.8 ms -0.04 %
arco-pro_production-mode + exec 3.47 s ± 77 ms 3.48 s ± 54 ms +0.24 %
arco-pro_production-mode_generate-package-json-webpack-plugin + exec 3.54 s ± 75 ms 3.58 s ± 44 ms +1.08 %
threejs_development-mode_10x + exec 1.71 s ± 10 ms 1.72 s ± 20 ms +0.39 %
threejs_development-mode_10x_hmr + exec 816 ms ± 6.3 ms 820 ms ± 8.3 ms +0.45 %
threejs_production-mode_10x + exec 5.55 s ± 44 ms 5.56 s ± 19 ms +0.20 %

@JSerFeng JSerFeng marked this pull request as draft August 20, 2024 11:22
@JSerFeng JSerFeng force-pushed the perf/seal branch 2 times, most recently from 658801e to 88b9850 Compare August 21, 2024 07:42
@JSerFeng JSerFeng marked this pull request as ready for review August 21, 2024 08:41
@JSerFeng JSerFeng merged commit a7542bc into main Aug 21, 2024
28 checks passed
@JSerFeng JSerFeng deleted the perf/seal branch August 21, 2024 09:58
@chenjiahan chenjiahan mentioned this pull request Aug 23, 2024
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) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants