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: module group get_key #6142

Merged
merged 6 commits into from
Apr 9, 2024
Merged

Conversation

SyMind
Copy link
Member

@SyMind SyMind commented Apr 9, 2024

Summary

Replace num_bigint::BigUint with FxHasher to avoid the overhead of hash large key in chunk_key_to_string.

It will be very evident in the HMR stage, where ChunkUkey continues to increase and BigUint values will continue to increase.

The hexadecimal string representation of BigUint can become excessively long.

let key = selected_chunks_key.to_str_radix(16);

Making its hashing computationally expensive.

module_group_map.entry(key)

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 Apr 9, 2024
Copy link

netlify bot commented Apr 9, 2024

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 677c131
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/6614bd8fdbca8700078d88a4

@SyMind SyMind marked this pull request as ready for review April 9, 2024 03:06
@SyMind
Copy link
Member Author

SyMind commented Apr 9, 2024

!bench

@rspack-bot
Copy link

rspack-bot commented Apr 9, 2024

📝 Benchmark detail: Open

Name Base (2024-04-09 10b9605) Current Change
10000_development-mode + exec 2.65 s ± 36 ms 2.64 s ± 30 ms -0.16 %
10000_development-mode_hmr + exec 670 ms ± 3.3 ms 667 ms ± 5.6 ms -0.38 %
10000_production-mode + exec 2.7 s ± 40 ms 2.71 s ± 38 ms +0.43 %
arco-pro_development-mode + exec 2.51 s ± 40 ms 2.53 s ± 67 ms +1.03 %
arco-pro_development-mode_hmr + exec 444 ms ± 2.3 ms 442 ms ± 3.2 ms -0.49 %
arco-pro_development-mode_hmr_intercept-plugin + exec 454 ms ± 2.7 ms 451 ms ± 2.9 ms -0.57 %
arco-pro_development-mode_intercept-plugin + exec 3.25 s ± 57 ms 3.29 s ± 77 ms +1.17 %
arco-pro_production-mode + exec 3.97 s ± 79 ms 3.97 s ± 97 ms -0.02 %
arco-pro_production-mode_intercept-plugin + exec 4.72 s ± 87 ms 4.72 s ± 62 ms +0.09 %
threejs_development-mode_10x + exec 2 s ± 22 ms 2 s ± 23 ms -0.41 %
threejs_development-mode_10x_hmr + exec 727 ms ± 21 ms 728 ms ± 9.7 ms +0.08 %
threejs_production-mode_10x + exec 5.28 s ± 37 ms 5.28 s ± 36 ms -0.03 %

@web-infra-dev web-infra-dev deleted a comment from rspack-bot Apr 9, 2024
@SyMind SyMind merged commit 8f122d4 into web-infra-dev:main Apr 9, 2024
27 checks passed
@SyMind
Copy link
Member Author

SyMind commented Apr 9, 2024

!canary

@SyMind SyMind deleted the perf-module-group branch April 9, 2024 04:46
Copy link
Contributor

github-actions bot commented Apr 9, 2024

0.5.9-canary-677c131-20240409051353

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.

None yet

3 participants