Skip to content

refactor(hmr): limit incremental asset processing#14841

Draft
LingyuCoder wants to merge 1 commit into
seal/hmr-existing-leaf-14768from
seal/hmr-process-assets-14767
Draft

refactor(hmr): limit incremental asset processing#14841
LingyuCoder wants to merge 1 commit into
seal/hmr-existing-leaf-14768from
seal/hmr-process-assets-14767

Conversation

@LingyuCoder

@LingyuCoder LingyuCoder commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Index current chunks by ID and use changed-chunk mutations to avoid rescanning stable HMR chunks.
  • Preserve removed-module, removed-runtime, and full-scan fallback behavior.
  • Add focused regressions for unchanged chunks, hash changes, removals, and missing mutation provenance.

Related links

Source PR: #14772

Closes #14767

Checklist

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

Use changed chunk mutations to skip stable HMR chunks while preserving removed modules, runtime removals, and the full-scan fallback.

Co-authored-by: Matthew Davis <276116661+matthewdavis-oai@users.noreply.github.com>
@LingyuCoder LingyuCoder changed the title perf(hmr): limit incremental asset processing refactor(hmr): limit incremental asset processing Jul 17, 2026
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

📝 Benchmark detail: Open

Name Base (25274d8) Current Change
10000_big_production-mode_disable-minimize + exec 12.1 s ± 334 ms 12 s ± 197 ms -0.93 %
10000_development-mode + exec 895 ms ± 19 ms 899 ms ± 65 ms +0.42 %
10000_development-mode_hmr + stats 162 ms ± 18 ms 159 ms ± 11 ms -1.72 %
10000_development-mode_noop-loader + exec 1.78 s ± 135 ms 1.74 s ± 36 ms -2.40 %
10000_production-mode + exec 1.02 s ± 32 ms 1.01 s ± 34 ms -1.64 %
10000_production-mode_persistent-cold + exec 1.21 s ± 38 ms 1.17 s ± 46 ms -2.87 %
10000_production-mode_persistent-hot + exec 634 ms ± 12 ms 626 ms ± 15 ms -1.36 %
10000_production-mode_source-map + exec 1.21 s ± 97 ms 1.16 s ± 30 ms -4.28 %
arco-pro_development-mode + exec 1.25 s ± 40 ms 1.27 s ± 75 ms +1.05 %
arco-pro_development-mode_hmr + stats 33 ms ± 1.3 ms 34 ms ± 6 ms +2.41 %
arco-pro_production-mode + exec 2.34 s ± 154 ms 2.32 s ± 124 ms -0.84 %
arco-pro_production-mode_generate-package-json-webpack-plugin + exec 2.42 s ± 84 ms 2.43 s ± 77 ms +0.76 %
arco-pro_production-mode_persistent-cold + exec 2.4 s ± 129 ms 2.4 s ± 164 ms +0.04 %
arco-pro_production-mode_persistent-hot + exec 344 ms ± 9 ms 345 ms ± 8.2 ms +0.35 %
arco-pro_production-mode_source-map + exec 2.84 s ± 68 ms 2.81 s ± 88 ms -1.25 %
arco-pro_production-mode_source-map_persistent-cold + exec 2.95 s ± 129 ms 2.89 s ± 78 ms -2.06 %
arco-pro_production-mode_source-map_persistent-hot + exec 477 ms ± 7.1 ms 475 ms ± 8.7 ms -0.38 %
arco-pro_production-mode_traverse-chunk-modules + exec 2.37 s ± 143 ms 2.39 s ± 136 ms +0.77 %
bundled-threejs_development-mode + exec 181 ms ± 2.9 ms 180 ms ± 5.1 ms -0.55 %
bundled-threejs_production-mode + exec 208 ms ± 5.7 ms 212 ms ± 8.1 ms +1.63 %
large-dyn-imports_development-mode + exec 1.17 s ± 31 ms 1.17 s ± 43 ms +0.31 %
large-dyn-imports_production-mode + exec 1.27 s ± 30 ms 1.27 s ± 47 ms +0.06 %
threejs_development-mode_10x + exec 775 ms ± 13 ms 781 ms ± 32 ms +0.88 %
threejs_development-mode_10x_hmr + stats 112 ms ± 2.7 ms 110 ms ± 7 ms -1.83 %
threejs_production-mode_10x + exec 2.86 s ± 136 ms 2.8 s ± 44 ms -2.06 %
threejs_production-mode_10x_persistent-cold + exec 2.95 s ± 26 ms 2.95 s ± 137 ms -0.04 %
threejs_production-mode_10x_persistent-hot + exec 380 ms ± 7.9 ms 378 ms ± 4 ms -0.53 %
threejs_production-mode_10x_source-map + exec 3.66 s ± 179 ms 3.6 s ± 83 ms -1.75 %
10000_big_production-mode_disable-minimize + rss memory 2179 MiB ± 83.1 MiB 2189 MiB ± 18.7 MiB +0.49 %
10000_development-mode + rss memory 538 MiB ± 14 MiB 541 MiB ± 18.2 MiB +0.66 %
10000_development-mode_hmr + rss memory 788 MiB ± 40.7 MiB 774 MiB ± 46.2 MiB -1.72 %
10000_development-mode_noop-loader + rss memory 805 MiB ± 11.9 MiB 807 MiB ± 9.36 MiB +0.27 %
10000_production-mode + rss memory 466 MiB ± 9.03 MiB 467 MiB ± 11.3 MiB +0.06 %
10000_production-mode_persistent-cold + rss memory 662 MiB ± 11.1 MiB 666 MiB ± 9.79 MiB +0.54 %
10000_production-mode_persistent-hot + rss memory 649 MiB ± 33.8 MiB 656 MiB ± 29 MiB +1.19 %
10000_production-mode_source-map + rss memory 483 MiB ± 32.9 MiB 478 MiB ± 47.4 MiB -1.02 %
arco-pro_development-mode + rss memory 399 MiB ± 2.04 MiB 403 MiB ± 7.68 MiB +0.89 %
arco-pro_development-mode_hmr + rss memory 422 MiB ± 8.17 MiB 426 MiB ± 14.9 MiB +0.93 %
arco-pro_production-mode + rss memory 574 MiB ± 12.9 MiB 579 MiB ± 7.38 MiB +0.82 %
arco-pro_production-mode_generate-package-json-webpack-plugin + rss memory 588 MiB ± 8.89 MiB 583 MiB ± 60.4 MiB -0.85 %
arco-pro_production-mode_persistent-cold + rss memory 660 MiB ± 26.3 MiB 663 MiB ± 14.7 MiB +0.54 %
arco-pro_production-mode_persistent-hot + rss memory 293 MiB ± 9.15 MiB 290 MiB ± 6.43 MiB -1.07 %
arco-pro_production-mode_source-map + rss memory 682 MiB ± 11.2 MiB 680 MiB ± 32.3 MiB -0.35 %
arco-pro_production-mode_source-map_persistent-cold + rss memory 812 MiB ± 37.6 MiB 813 MiB ± 17.8 MiB +0.13 %
arco-pro_production-mode_source-map_persistent-hot + rss memory 413 MiB ± 12.3 MiB 417 MiB ± 8.43 MiB +1.05 %
arco-pro_production-mode_traverse-chunk-modules + rss memory 579 MiB ± 11.1 MiB 584 MiB ± 11.7 MiB +0.80 %
bundled-threejs_development-mode + rss memory 126 MiB ± 3.29 MiB 127 MiB ± 8.03 MiB +0.50 %
bundled-threejs_production-mode + rss memory 137 MiB ± 2.18 MiB 138 MiB ± 5.08 MiB +0.78 %
large-dyn-imports_development-mode + rss memory 553 MiB ± 20.4 MiB 559 MiB ± 5.17 MiB +1.20 %
large-dyn-imports_production-mode + rss memory 406 MiB ± 1.63 MiB 406 MiB ± 4.81 MiB +0.16 %
threejs_development-mode_10x + rss memory 432 MiB ± 9.74 MiB 438 MiB ± 15.2 MiB +1.48 %
threejs_development-mode_10x_hmr + rss memory 592 MiB ± 10.9 MiB 598 MiB ± 21.3 MiB +1.00 %
threejs_production-mode_10x + rss memory 615 MiB ± 22.8 MiB 615 MiB ± 9.43 MiB -0.05 %
threejs_production-mode_10x_persistent-cold + rss memory 576 MiB ± 12 MiB 572 MiB ± 7.62 MiB -0.82 %
threejs_production-mode_10x_persistent-hot + rss memory 378 MiB ± 7.36 MiB 375 MiB ± 15 MiB -0.86 %
threejs_production-mode_10x_source-map + rss memory 738 MiB ± 26.3 MiB 730 MiB ± 54.8 MiB -1.09 %

Base persistent cache hit rate: 👍

Current persistent cache hit rate: 👍

@github-actions

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 2cdc54e to perf(core): reuse existing leaf chunk graphs by harpsealjs

⏳ The base commit triggered a linux binding build, but its binary size data has not been generated yet, so the size comparison is skipped.

Please re-run this workflow once the ecosystem-benchmark data for that commit is published.

Warning

Reference only — not the real baseline. The base commit's data isn't ready yet, so this compares against the nearest earlier commit that has data (25274d8) for a rough estimate:

❌ Size increased by 36.00KB from 66.59MB to 66.63MB (⬆️0.05%)

@github-actions

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 5 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
popular-libs 1.7 MB 552.1 KB - -
react-1k 823.1 KB 217.0 KB - -
react-5k 2.7 MB 663.8 KB - -
react-10k 5.6 MB 1.3 MB - -
ui-components 4.9 MB 1.4 MB - -
📋 Detailed Reports (Click to expand)

📁 popular-libs

Path: ../build-tools-performance/cases/popular-libs/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 1.7 MB - -
🗜️ Gzip Size 552.1 KB - -
📄 JavaScript 1.7 MB - -
🎨 CSS 0 B - -
🌐 HTML 289.0 B - -
📁 Other Assets 0 B - -

📁 react-1k

Path: ../build-tools-performance/cases/react-1k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 823.1 KB - -
🗜️ Gzip Size 217.0 KB - -
📄 JavaScript 822.7 KB - -
🎨 CSS 0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 react-5k

Path: ../build-tools-performance/cases/react-5k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.7 MB - -
🗜️ Gzip Size 663.8 KB - -
📄 JavaScript 2.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 react-10k

Path: ../build-tools-performance/cases/react-10k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 5.6 MB - -
🗜️ Gzip Size 1.3 MB - -
📄 JavaScript 5.6 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 4.9 MB - -
🗜️ Gzip Size 1.4 MB - -
📄 JavaScript 4.8 MB - -
🎨 CSS 112.1 KB - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

Generated by Rsdoctor GitHub Action

@codspeed-hq

codspeed-hq Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 47 skipped benchmarks1


Comparing seal/hmr-process-assets-14767 (2cdc54e) with seal/hmr-existing-leaf-14768 (c360985)

Open in CodSpeed

Footnotes

  1. 47 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Perf]: HMR process_assets performs graph-wide old-module work for unchanged runtimes

1 participant