Skip to content

fix: compare async block values in code splitting cache - #14904

Draft
JSerFeng wants to merge 1 commit into
mainfrom
codex/async-block-code-splitting-cache
Draft

fix: compare async block values in code splitting cache#14904
JSerFeng wants to merge 1 commit into
mainfrom
codex/async-block-code-splitting-cache

Conversation

@JSerFeng

Copy link
Copy Markdown
Contributor

Summary

  • generate AsyncDependenciesBlockIdentifier from the parent module and the block's module-local index
  • validate code-splitting cache reuse from each block's actual value: group options, ordered target modules, and per-runtime connection states
  • refresh cached chunk-group origin metadata when code splitting is reused
  • add a watch regression covering loc-only changes and async-block target changes

Why

Async block identity previously included dependency resource data and source location. A loc-only edit could therefore change the block key even when its code-splitting topology was unchanged.

Identity is now a stable module-local slot used for graph lookup. Cache reuse is decided separately from the block's code-splitting value. When the value is unchanged, the cached chunk graph is reused and its origin module, loc, and request are updated. When a block points to different modules or changes its group/runtime behavior, the chunk graph is rebuilt.

This keeps loc-only rebuilds on the fast path without allowing stale chunk topology or origin metadata.

Validation

  • corepack pnpm run build:js
  • corepack pnpm run build:binding:dev
  • cargo clippy -p rspack_core --lib -- -D warnings
  • cargo fmt --all --check
  • corepack pnpm run test:base -t "watchCases/build-chunk-graph/async-block-value"
  • corepack pnpm run test:base -t "watchCases/build-chunk-graph/skip-building-chunk-graph"

@github-actions

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 6a47ae7 to fix(asset): avoid JavaScript output for URL-only assets (#14885) by Fy

⏳ 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 (c30f7a6) for a rough estimate:

❌ Size increased by 28.00KB from 66.71MB to 66.74MB (⬆️0.04%)

@github-actions

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
popular-libs 1.7 MB 552.1 KB 0 0
react-10k 5.6 MB 1.3 MB 0 0
react-1k 823.1 KB 217.0 KB 0 0
react-5k 2.7 MB 663.8 KB 0 0
ui-components 4.9 MB 1.4 MB 0 0

Generated by Rsdoctor GitHub Action

@codspeed-hq

codspeed-hq Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 46 untouched benchmarks
⏩ 47 skipped benchmarks1


Comparing codex/async-block-code-splitting-cache (6a47ae7) with main (de52a0c)

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.

1 participant