Repository navigation
perf(dev): only ship rows with dynamic edges in registerGraph - #11019
Merged
Merged
Conversation
Member
Author
How to use the Graphite Merge QueueAdd the label graphite: merge-when-ready to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
✅ Deploy Preview for rolldown-rs canceled.
|
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://dev-sparse-dynamic-edges-rolldown-rs.voidzero-docs.workers.dev (commit 3f76b5c)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
h-a-n-a
marked this pull request as ready for review
September 29, 2026 02:55
h-a-n-a
requested review from
IWANABETHATGUY,
hyfdev,
sapphi-red and
shulaoda
as code owners
September 29, 2026 02:55
Member
Author
Merge activity
|
shulaoda
approved these changes
Sep 29, 2026
graphite-app Bot
pushed a commit
that referenced
this pull request
Sep 29, 2026
use a sparse map to store dynamic edges in `registerGraph`.
This will NOT break Vite runtime.
## Benchmark
**Data:** 42 lazy chunks from a large real-world app, with 23,834 module rows. The app does not call `acceptExports`, so `dynamicEdges` is the only field that changes.
**Totals**
```
before after saved
registerGraph 4,299,916 4,230,205 69,711 (−1.6% of payload)
all chunk bytes 282,446,695 282,376,984 69,711 (−0.025%)
```
**Largest chunks**
| chunk | rows | before | after | saved |
|---|---|---|---|---|
| chunk A | 7,458 | 1,289,047 | 1,267,016 | 22,031 (1.7%) |
| chunk B | 4,177 | 727,719 | 715,784 | 11,935 (1.6%) |
| chunk C | 3,724 | 712,066 | 701,097 | 10,969 (1.5%) |
| chunk D | 2,715 | 474,344 | 466,252 | 8,092 (1.7%) |
| chunk E | 2,603 | 564,362 | 556,845 | 7,517 (1.3%) |
| chunk F | 1,567 | 196,125 | 191,437 | 4,688 (2.4%) |
The saving is about 3 bytes for each module that has no `import()`.
**Small payloads:** 22 of the 42 payloads have 5 rows or fewer, and together they save 10 bytes. A one-row payload whose row has a dynamic edge grows by 2 bytes:
```
before: ...localCount:1,edges:[[]],dynamicEdges:[[1]]});
after: ...localCount:1,edges:[[]],dynamicEdges:{0:[1]}});
```
graphite-app
Bot
force-pushed
the
dev-sparse-dynamic-edges
branch
from
September 29, 2026 03:01
bb9aca1 to
f62c661
Compare
use a sparse map to store dynamic edges in `registerGraph`.
This will NOT break Vite runtime.
## Benchmark
**Data:** 42 lazy chunks from a large real-world app, with 23,834 module rows. The app does not call `acceptExports`, so `dynamicEdges` is the only field that changes.
**Totals**
```
before after saved
registerGraph 4,299,916 4,230,205 69,711 (−1.6% of payload)
all chunk bytes 282,446,695 282,376,984 69,711 (−0.025%)
```
**Largest chunks**
| chunk | rows | before | after | saved |
|---|---|---|---|---|
| chunk A | 7,458 | 1,289,047 | 1,267,016 | 22,031 (1.7%) |
| chunk B | 4,177 | 727,719 | 715,784 | 11,935 (1.6%) |
| chunk C | 3,724 | 712,066 | 701,097 | 10,969 (1.5%) |
| chunk D | 2,715 | 474,344 | 466,252 | 8,092 (1.7%) |
| chunk E | 2,603 | 564,362 | 556,845 | 7,517 (1.3%) |
| chunk F | 1,567 | 196,125 | 191,437 | 4,688 (2.4%) |
The saving is about 3 bytes for each module that has no `import()`.
**Small payloads:** 22 of the 42 payloads have 5 rows or fewer, and together they save 10 bytes. A one-row payload whose row has a dynamic edge grows by 2 bytes:
```
before: ...localCount:1,edges:[[]],dynamicEdges:[[1]]});
after: ...localCount:1,edges:[[]],dynamicEdges:{0:[1]}});
```
graphite-app
Bot
force-pushed
the
dev-sparse-dynamic-edges
branch
from
September 29, 2026 03:02
f62c661 to
3f76b5c
Compare
Merged
shulaoda
added a commit
that referenced
this pull request
Sep 30, 2026
## [1.2.12] - 2026-09-30 ### 🚀 Features - inline common chunks containing import() and deduplicate shared code in lazy chunks (#11034) by @hyfdev - experimental `inlineCommonChunks` support (#10899) by @hyfdev - dev: ship imported bindings for HMR partial accept (#10856) by @h-a-n-a ### 🐛 Bug Fixes - chunking: re-derive chunk exec orders after the runtime leaves its host chunk (#11005) by @hyfdev - code-splitting: gate member-read init paths on the reading statement (#11039) by @hyfdev - code-splitting: retain initialization paths through re-exported namespaces (#11037) by @hyfdev - dev: reject non-ESM output formats in dev mode (#11038) by @h-a-n-a - dev: align `import.meta.hot.accept` deps with Vite (#10997) by @h-a-n-a - dev: clear the resolver cache when a file is created or deleted (#10986) by @waltuov - error: name the resolved specifier in unresolved import diagnostics (#11014) by @linyiru - make entries-aware chunk merging deterministic (#11002) by @hyfdev - watch: avoid restarting macOS watcher for unchanged paths (#10992) by @sep2 ### 🚜 Refactor - dev: ship the dev runtime entry as one file (#10998) by @h-a-n-a - binding: remove `__internalForcePanic` (#10989) by @IWANABETHATGUY ### 📚 Documentation - fix cloudflare preview builds (#10996) by @sapphi-red - fix build config loader warning (#10994) by @sapphi-red - deps: use Vite 8 (#10993) by @sapphi-red ### ⚡ Performance - dev: only ship rows with dynamic edges in registerGraph (#11019) by @h-a-n-a ### 🧪 Testing - code-splitting: cover more re-exported namespace shapes (#11042) by @hyfdev - webcontainer: cover the WebContainer download fallback in plain Node (#10966) by @shulaoda - dev: pin the runtime entry file layout that Vite serves (#10983) by @h-a-n-a ### ⚙️ Miscellaneous Tasks - pin VOID_API_URL for the docs deploy (#11041) by @shulaoda - opt into the WebContainer smoke test for napi bumps and loader changes (#10967) by @shulaoda - deps: upgrade oxc to 0.152.0 (#11018) by @camc314 - deps: update rust crates (#11012) by @renovate[bot] - deps: update npm packages (#11011) by @renovate[bot] - deps: update crate-ci/typos action to v1.50.3 (#11023) by @renovate[bot] - deps: update test262 submodule for tests (#11022) by @rolldown-guard[bot] - deps: update rollup submodule for tests to v4.63.5 (#11021) by @rolldown-guard[bot] - deps: update dependency vite-plus to v1 (#11017) by @renovate[bot] - deps: update github actions (#11010) by @renovate[bot] - remove `CLAUDE.md` (#10925) by @iiio2 - verify release debug info by matching file IDs (#10988) by @IWANABETHATGUY - deps: update rollup submodule for tests to v4.63.4 (#10940) by @rolldown-guard[bot] ### ❤️ New Contributors * @waltuov made their first contribution in [#10986](#10986) * @linyiru made their first contribution in [#11014](#11014) * @sep2 made their first contribution in [#10992](#10992) Co-authored-by: shulaoda <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

use a sparse map to store dynamic edges in
registerGraph.This will NOT break Vite runtime.
Benchmark
Data: 42 lazy chunks from a large real-world app, with 23,834 module rows. The app does not call
acceptExports, sodynamicEdgesis the only field that changes.Totals
Largest chunks
The saving is about 3 bytes for each module that has no
import().Small payloads: 22 of the 42 payloads have 5 rows or fewer, and together they save 10 bytes. A one-row payload whose row has a dynamic edge grows by 2 bytes: