Skip to content

fix: resolveData.*_dependencies should work when factorize success #10967

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

Closed
wants to merge 5 commits into from

Conversation

jerrykingxyz
Copy link
Contributor

@jerrykingxyz jerrykingxyz commented Jul 9, 2025

Summary

Rspack will lose dependency factorize info include file_dependencies, missing_dependencies when it factorize success,
this behaivor will make the file_dependencies added by user at normalModuleFactory.hooks.resolve useless.

This PR will make dependency rebuilds behave more like modules, and the dependency will refactorize if modifed files in its factorize_info.file_dependencies.

Related links

Checklist

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

Copy link

netlify bot commented Jul 9, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 46cdb48
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/686f6a97e0efc30008a41341

@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: bug fix release: bug related release(mr only) labels Jul 9, 2025
@jerrykingxyz jerrykingxyz requested a review from ahabhgk July 9, 2025 10:12
Copy link
Contributor

github-actions bot commented Jul 9, 2025

📦 Binary Size-limit

Comparing 46cdb48 to fix: getModuleChunksIterable was mistakenly deleted (#10976) by Cong-Cong Pan

🎉 Size decreased by 121.25KB from 57.57MB to 57.45MB (⬇️0.21%)

Copy link

codspeed-hq bot commented Jul 9, 2025

CodSpeed Performance Report

Merging #10967 will improve performances by 75.06%

Comparing jerry/cache (46cdb48) with main (51da0ef)

🎉 Hooray! codspeed-node just leveled up to 4.0.1!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

⚡ 1 improvements
✅ 15 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
bundle@basic-react-development 8.9 ms 5.1 ms +75.06%

Copy link
Contributor

github-actions bot commented Jul 10, 2025

📝 Benchmark detail: Open

Name Base (2025-07-08 cee43e7) Current Change
10000_big_production-mode_disable-minimize + exec 33.5 s ± 830 ms 32.2 s ± 858 ms -3.82 %
10000_development-mode + exec 1.9 s ± 29 ms 1.94 s ± 26 ms +2.30 %
10000_development-mode_hmr + exec 700 ms ± 3.1 ms 729 ms ± 15 ms +4.09 %
10000_production-mode + exec 1.94 s ± 39 ms 1.99 s ± 31 ms +2.49 %
10000_production-mode_persistent-cold + exec 2.09 s ± 29 ms 2.18 s ± 27 ms +4.06 %
10000_production-mode_persistent-hot + exec 1.5 s ± 53 ms 1.65 s ± 47 ms +10.30 %
arco-pro_development-mode + exec 1.81 s ± 49 ms 1.81 s ± 76 ms +0.12 %
arco-pro_development-mode_hmr + exec 368 ms ± 1.4 ms 384 ms ± 1.5 ms +4.32 %
arco-pro_production-mode + exec 3.72 s ± 432 ms 3.35 s ± 87 ms -10.07 %
arco-pro_production-mode_generate-package-json-webpack-plugin + exec 3.75 s ± 335 ms 3.48 s ± 94 ms -7.20 %
arco-pro_production-mode_persistent-cold + exec 3.75 s ± 456 ms 3.47 s ± 131 ms -7.29 %
arco-pro_production-mode_persistent-hot + exec 2.12 s ± 52 ms 2.2 s ± 104 ms +3.74 %
arco-pro_production-mode_traverse-chunk-modules + exec 3.79 s ± 168 ms 3.39 s ± 193 ms -10.48 %
large-dyn-imports_development-mode + exec 2.05 s ± 25 ms 2.16 s ± 29 ms +5.25 %
large-dyn-imports_production-mode + exec 2.01 s ± 43 ms 2.06 s ± 48 ms +2.53 %
threejs_development-mode_10x + exec 1.62 s ± 127 ms 1.55 s ± 19 ms -4.11 %
threejs_development-mode_10x_hmr + exec 929 ms ± 21 ms 928 ms ± 17 ms -0.17 %
threejs_production-mode_10x + exec 4.82 s ± 192 ms 4.8 s ± 227 ms -0.39 %
threejs_production-mode_10x_persistent-cold + exec 4.92 s ± 214 ms 4.91 s ± 64 ms -0.14 %
threejs_production-mode_10x_persistent-hot + exec 4.25 s ± 35 ms 4.31 s ± 49 ms +1.55 %
10000_big_production-mode_disable-minimize + rss memory 9587 MiB ± 288 MiB 9718 MiB ± 163 MiB +1.36 %
10000_development-mode + rss memory 690 MiB ± 16.5 MiB 801 MiB ± 18.7 MiB +16.18 %
10000_development-mode_hmr + rss memory 835 MiB ± 53.6 MiB 965 MiB ± 26.7 MiB +15.56 %
10000_production-mode + rss memory 633 MiB ± 57.7 MiB 731 MiB ± 34.8 MiB +15.49 %
10000_production-mode_persistent-cold + rss memory 788 MiB ± 31.9 MiB 874 MiB ± 22.7 MiB +10.96 %
10000_production-mode_persistent-hot + rss memory 764 MiB ± 33.4 MiB 838 MiB ± 36.8 MiB +9.74 %
arco-pro_development-mode + rss memory 662 MiB ± 66.3 MiB 629 MiB ± 40.8 MiB -5.05 %
arco-pro_development-mode_hmr + rss memory 536 MiB ± 13.2 MiB 535 MiB ± 19 MiB -0.17 %
arco-pro_production-mode + rss memory 726 MiB ± 65.4 MiB 751 MiB ± 63.8 MiB +3.40 %
arco-pro_production-mode_generate-package-json-webpack-plugin + rss memory 731 MiB ± 38.1 MiB 737 MiB ± 119 MiB +0.75 %
arco-pro_production-mode_persistent-cold + rss memory 862 MiB ± 96.5 MiB 832 MiB ± 41.9 MiB -3.56 %
arco-pro_production-mode_persistent-hot + rss memory 719 MiB ± 60.9 MiB 684 MiB ± 61.1 MiB -4.90 %
arco-pro_production-mode_traverse-chunk-modules + rss memory 733 MiB ± 46.8 MiB 740 MiB ± 101 MiB +0.90 %
large-dyn-imports_development-mode + rss memory 731 MiB ± 9.7 MiB 787 MiB ± 6.38 MiB +7.76 %
large-dyn-imports_production-mode + rss memory 642 MiB ± 6.78 MiB 657 MiB ± 6.51 MiB +2.23 %
threejs_development-mode_10x + rss memory 723 MiB ± 26.9 MiB 623 MiB ± 16.8 MiB -13.91 %
threejs_development-mode_10x_hmr + rss memory 881 MiB ± 43.2 MiB 828 MiB ± 41 MiB -6.00 %
threejs_production-mode_10x + rss memory 964 MiB ± 136 MiB 791 MiB ± 202 MiB -17.96 %
threejs_production-mode_10x_persistent-cold + rss memory 941 MiB ± 16.4 MiB 843 MiB ± 20.7 MiB -10.48 %
threejs_production-mode_10x_persistent-hot + rss memory 731 MiB ± 30.1 MiB 729 MiB ± 36.4 MiB -0.22 %

Threshold exceeded: ["10000_production-mode_persistent-hot + exec","large-dyn-imports_development-mode + exec"]

@ahabhgk
Copy link
Contributor

ahabhgk commented Jul 11, 2025

I'm ok with this if the 10000_production-mode_persistent-hot + exec benchmark is expected

@jerrykingxyz
Copy link
Contributor Author

This PR will result in

  1. During the make phase, all dependencies will be looped and checked if they depend on modified files, causing a lot of performance regressions.
  2. All dependencies will save factorization info, increasing memory usage.
    The probability that a dependency that has been factorized successfully needs to be rebuilt is low, so I will temporarily close this PR until there is a related request or bug.

@jerrykingxyz jerrykingxyz deleted the jerry/cache branch July 11, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: bug fix release: bug 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.

2 participants