Repository navigation
Commit bdc6af1
committed
perf(ppr): pin-first resolution for hole-free bake-lane loaders on shell HITs
On a shell HIT a bake-lane loader re-ran and the hydration payload gated on
that fresh run's full latency, then discarded its values (the snapshot pin
wins wholesale). A slow layout loader added its whole duration to every HIT's
stream window; a fresh-run rejection diverged the payload from the frozen
prelude (hydration mismatch flash).
Each pinned loader record now carries a capture-computed hole bit
(ShellSnapshotLoaderValue.holes, from elide's existing walk). Hole-free
records resolve the payload promise immediately from the pin; the fresh run
still executes ungated (side effects and cache read-through preserved,
waitUntil-extended) and its rejection is swallowed — the pin already matches
the prelude. Hole-carrying and legacy (pre-bit) records keep the gated path:
only the loader body can mint the live nested promises.
Also adds a dev-only ppr:tail Server-Timing mirror (consume-on-read buffer,
same doctrine as the ppr:capture mirror from #651): the next ppr GET's header
carries the previous HIT's per-stage tail offsets
(seed/match/handover/first-html/complete + byte counts).
E2e: new /shell-cache/bake-slow and /ppr-shell/bake-slow fixtures (600ms
hole-free bake-lane layout loader + 30ms live hole) with dev+production
tests in both apps; red-proof: 616ms HIT with the branch disabled vs <400ms
bound. Unit: pin-first timing/rejection (red-before-green), capture hole
bit, seed mapping. Docs: loader-container-bake.md, ppr-shell-resume.md,
feature-map.md, feature-file-map.md.1 parent af35562 commit bdc6af1
25 files changed
Lines changed: 1020 additions & 80 deletions
File tree
- packages/rangojs-router
- docs
- design
- internal
- e2e
- test-app/src
- components
- urls
- src
- cache
- __tests__
- router/segment-resolution
- __tests__
- rsc
- __tests__
- server
- tests/cloudflare-basic
- e2e
- src
- components
- loaders
- pages
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
214 | 245 | | |
215 | 246 | | |
216 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
1188 | 1200 | | |
1189 | 1201 | | |
1190 | 1202 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
741 | 789 | | |
742 | 790 | | |
743 | 791 | | |
| |||
0 commit comments