Skip to content
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

Generate per-segment prefetch responses #72168

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

acdlite
Copy link
Contributor

@acdlite acdlite commented Nov 1, 2024

Follow up to #71113.

This generates a prefetch response for route segments, so the client can request them individually, and reuse shared layouts between separate page prefetches.

Since this is exclusive to PPR, segment prefetches are always static and do not reach the application layer. They are served directly from cache. (This part was implemented in the previous PR.)

The prerendered segment data is generated (and revalidated) simultaneously with the prerender of the entire page, to ensure consistency between parent and child segments. Since we always rebuild the whole page, we can save an extra render of each segment by reusing the Flight response that was used to generate the initial HTML.

We do this by decoding the page data using a server-side Flight consumer, picking out an individual segment's data, then re-encoding it as its own Flight response. We have to do this once per segment — not ideal, but for now it's the only way to make sure the side effects from the original Flight stream (e.g. Float preloads) are transferred to the per-segment streams.

This PR does not yet include any updates to the client router.

@acdlite acdlite force-pushed the generate-per-segment-prefetch branch from 938c68c to 0257bb8 Compare November 1, 2024 05:04
@acdlite acdlite marked this pull request as ready for review November 1, 2024 05:09
@ijjk
Copy link
Member

ijjk commented Nov 1, 2024

Failing test suites

Commit: 80ef83d

pnpm test-start-turbo test/production/eslint/test/next-build-and-lint.test.ts (turbopack)

  • Next Build > production mode > first time setup with TypeScript - ESLint v8
  • Next Build > production mode > first time setup with TypeScript - ESLint v9
Expand output

● Next Build › production mode › first time setup with TypeScript - ESLint v8

expect(received).toMatchSnapshot()

Snapshot name: `Next Build production mode first time setup with TypeScript - ESLint v8 1`

- Snapshot  - 0
+ Received  + 3

@@ -189,10 +189,13 @@
        "warn",
      ],
      "no-array-constructor": [
        "off",
      ],
+     "no-class-assign": [
+       "off",
+     ],
      "no-const-assign": [
        "off",
      ],
      "no-dupe-args": [
        "off",

  219 |           )
  220 |
> 221 |           expect(eslintConfigAfterSetup).toMatchSnapshot()
      |                                          ^
  222 |           expect({
  223 |             parser,
  224 |             settings,

  at Object.toMatchSnapshot (production/eslint/test/next-build-and-lint.test.ts:221:42)

● Next Build › production mode › first time setup with TypeScript - ESLint v9

expect(received).toMatchSnapshot()

Snapshot name: `Next Build production mode first time setup with TypeScript - ESLint v9 1`

- Snapshot  - 0
+ Received  + 3

@@ -189,10 +189,13 @@
        "warn",
      ],
      "no-array-constructor": [
        "off",
      ],
+     "no-class-assign": [
+       "off",
+     ],
      "no-const-assign": [
        "off",
      ],
      "no-dupe-args": [
        "off",

  302 |           )
  303 |
> 304 |           expect(eslintConfigAfterSetup).toMatchSnapshot()
      |                                          ^
  305 |           expect({
  306 |             parser,
  307 |             settings,

  at Object.toMatchSnapshot (production/eslint/test/next-build-and-lint.test.ts:304:42)

Read more about building and testing Next.js in contributing.md.

@ijjk
Copy link
Member

ijjk commented Nov 1, 2024

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary acdlite/next.js generate-per-segment-prefetch Change
buildDuration 19.8s 17.3s N/A
buildDurationCached 16.3s 14.3s N/A
nodeModulesSize 403 MB 403 MB ⚠️ +180 kB
nextStartRea..uration (ms) 467ms 472ms N/A
Client Bundles (main, webpack)
vercel/next.js canary acdlite/next.js generate-per-segment-prefetch Change
4789-HASH.js gzip 5.27 kB 5.27 kB N/A
8781.HASH.js gzip 169 B 169 B
9785-HASH.js gzip 45.4 kB 45.4 kB N/A
b5cfd723-HASH.js gzip 52.5 kB 52.5 kB N/A
framework-HASH.js gzip 57.3 kB 57.3 kB N/A
main-app-HASH.js gzip 234 B 231 B N/A
main-HASH.js gzip 33.1 kB 33.1 kB N/A
webpack-HASH.js gzip 1.71 kB 1.71 kB N/A
Overall change 169 B 169 B
Legacy Client Bundles (polyfills)
vercel/next.js canary acdlite/next.js generate-per-segment-prefetch Change
polyfills-HASH.js gzip 39.4 kB 39.4 kB
Overall change 39.4 kB 39.4 kB
Client Pages
vercel/next.js canary acdlite/next.js generate-per-segment-prefetch Change
_app-HASH.js gzip 194 B 193 B N/A
_error-HASH.js gzip 193 B 192 B N/A
amp-HASH.js gzip 511 B 508 B N/A
css-HASH.js gzip 343 B 343 B
dynamic-HASH.js gzip 1.84 kB 1.84 kB N/A
edge-ssr-HASH.js gzip 266 B 264 B N/A
head-HASH.js gzip 362 B 365 B N/A
hooks-HASH.js gzip 392 B 391 B N/A
image-HASH.js gzip 4.41 kB 4.41 kB N/A
index-HASH.js gzip 268 B 268 B
link-HASH.js gzip 2.78 kB 2.78 kB N/A
routerDirect..HASH.js gzip 329 B 327 B N/A
script-HASH.js gzip 397 B 394 B N/A
withRouter-HASH.js gzip 324 B 322 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 717 B 717 B
Client Build Manifests
vercel/next.js canary acdlite/next.js generate-per-segment-prefetch Change
_buildManifest.js gzip 751 B 751 B
Overall change 751 B 751 B
Rendered Page Sizes
vercel/next.js canary acdlite/next.js generate-per-segment-prefetch Change
index.html gzip 523 B 524 B N/A
link.html gzip 538 B 540 B N/A
withRouter.html gzip 519 B 519 B
Overall change 519 B 519 B
Edge SSR bundle Size Overall increase ⚠️
vercel/next.js canary acdlite/next.js generate-per-segment-prefetch Change
edge-ssr.js gzip 128 kB 128 kB N/A
page.js gzip 189 kB 197 kB ⚠️ +8.25 kB
Overall change 189 kB 197 kB ⚠️ +8.25 kB
Middleware size
vercel/next.js canary acdlite/next.js generate-per-segment-prefetch Change
middleware-b..fest.js gzip 670 B 668 B N/A
middleware-r..fest.js gzip 155 B 155 B
middleware.js gzip 31 kB 31 kB N/A
edge-runtime..pack.js gzip 844 B 844 B
Overall change 999 B 999 B
Next Runtimes Overall increase ⚠️
vercel/next.js canary acdlite/next.js generate-per-segment-prefetch Change
973-experime...dev.js gzip 322 B 322 B
973.runtime.dev.js gzip 314 B 314 B
app-page-exp...dev.js gzip 318 kB 318 kB ⚠️ +161 B
app-page-exp..prod.js gzip 122 kB 122 kB ⚠️ +128 B
app-page-tur..prod.js gzip 135 kB 135 kB ⚠️ +129 B
app-page-tur..prod.js gzip 130 kB 130 kB ⚠️ +162 B
app-page.run...dev.js gzip 308 kB 308 kB ⚠️ +158 B
app-page.run..prod.js gzip 118 kB 118 kB ⚠️ +161 B
app-route-ex...dev.js gzip 35.9 kB 35.9 kB
app-route-ex..prod.js gzip 24.3 kB 24.3 kB
app-route-tu..prod.js gzip 24.4 kB 24.4 kB
app-route-tu..prod.js gzip 24.1 kB 24.1 kB
app-route.ru...dev.js gzip 37.5 kB 37.5 kB
app-route.ru..prod.js gzip 24.1 kB 24.1 kB
pages-api-tu..prod.js gzip 9.59 kB 9.59 kB
pages-api.ru...dev.js gzip 11.4 kB 11.4 kB
pages-api.ru..prod.js gzip 9.58 kB 9.58 kB
pages-turbo...prod.js gzip 20.9 kB 20.9 kB
pages.runtim...dev.js gzip 26.5 kB 26.5 kB
pages.runtim..prod.js gzip 20.9 kB 20.9 kB
server.runti..prod.js gzip 914 kB 914 kB
Overall change 2.32 MB 2.32 MB ⚠️ +899 B
build cache Overall increase ⚠️
vercel/next.js canary acdlite/next.js generate-per-segment-prefetch Change
0.pack gzip 1.85 MB 2 MB ⚠️ +144 kB
index.pack gzip 144 kB 146 kB ⚠️ +2.31 kB
Overall change 2 MB 2.14 MB ⚠️ +146 kB
Diff details
Diff for page.js
@@ -15,7 +15,7 @@
       /***/
     },
 
-    /***/ 338: /***/ (
+    /***/ 4898: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -30,7 +30,7 @@
         default: () => /* binding */ nHandler,
       });
 
-      // NAMESPACE OBJECT: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsPNIS5f%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // NAMESPACE OBJECT: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsPNIS5f%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       var page_next_edge_ssr_entry_namespaceObject = {};
       __webpack_require__.r(page_next_edge_ssr_entry_namespaceObject);
       __webpack_require__.d(page_next_edge_ssr_entry_namespaceObject, {
@@ -47,6 +47,7 @@
         ViewportBoundary: () => entry_base /* ViewportBoundary */.p$,
         __next_app__: () => __next_app__,
         actionAsyncStorage: () => entry_base /* actionAsyncStorage */.Wz,
+        collectSegmentData: () => entry_base /* collectSegmentData */.MF,
         createMetadataComponents: () =>
           entry_base /* createMetadataComponents */.v4,
         createPrerenderParamsForClientSegment: () =>
@@ -82,35 +83,35 @@
         workUnitAsyncStorage: () => entry_base /* workUnitAsyncStorage */.Sz,
       });
 
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/server/web/globals.js
-      var globals = __webpack_require__(8975);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
-      var adapter = __webpack_require__(1427);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 86 modules
-      var render = __webpack_require__(1016);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 5 modules
-      var incremental_cache = __webpack_require__(5192);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/server/app-render/app-render.js + 63 modules
-      var app_render = __webpack_require__(8939);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/server/route-modules/app-page/module.compiled.js
-      var module_compiled = __webpack_require__(830);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/server/route-kind.js
-      var route_kind = __webpack_require__(4420);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/client/components/error-boundary.js
-      var error_boundary = __webpack_require__(2834);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/server/app-render/entry-base.js + 23 modules
-      var entry_base = __webpack_require__(9854); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsPNIS5f%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/server/web/globals.js
+      var globals = __webpack_require__(6857);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/server/web/adapter.js + 3 modules
+      var adapter = __webpack_require__(6205);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/build/webpack/loaders/next-edge-ssr-loader/render.js + 86 modules
+      var render = __webpack_require__(627);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/server/lib/incremental-cache/index.js + 5 modules
+      var incremental_cache = __webpack_require__(1918);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/server/app-render/app-render.js + 63 modules
+      var app_render = __webpack_require__(2617);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/server/route-modules/app-page/module.compiled.js
+      var module_compiled = __webpack_require__(176);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/server/route-kind.js
+      var route_kind = __webpack_require__(723);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/client/components/error-boundary.js
+      var error_boundary = __webpack_require__(7887);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/server/app-render/entry-base.js + 26 modules
+      var entry_base = __webpack_require__(2652); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js?name=app%2Fapp-edge-ssr%2Fpage&page=%2Fapp-edge-ssr%2Fpage&pagePath=private-next-app-dir%2Fapp-edge-ssr%2Fpage.js&appDir=%2Ftmp%2Fnext-statsPNIS5f%2Fstats-app%2Fapp&appPaths=%2Fapp-edge-ssr%2Fpage&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js&basePath=&assetPrefix=&nextConfigOutput=&flyingShuttle=false&preferredRegion=&middlewareConfig=e30%3D!./app/app-edge-ssr/page.js?__next_edge_ssr_entry__
       const module0 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 623)
+          __webpack_require__.bind(__webpack_require__, 4399)
         );
       const module1 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 8840)
+          __webpack_require__.bind(__webpack_require__, 3651)
         );
       const page2 = () =>
         Promise.resolve(/* import() eager */).then(
-          __webpack_require__.bind(__webpack_require__, 1937)
+          __webpack_require__.bind(__webpack_require__, 9042)
         );
 
       // We inject the tree and pages here so that we can use them in the route
@@ -173,12 +174,12 @@
       });
 
       //# sourceMappingURL=app-page.js.map
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/lib/page-types.js
-      var page_types = __webpack_require__(6157);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/server/app-render/encryption-utils.js
-      var encryption_utils = __webpack_require__(1651);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/esm/server/app-render/action-utils.js
-      var action_utils = __webpack_require__(6024); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzIjpmYWxzZX0sInR5cGVzY3JpcHQiOnsiaWdub3JlQnVpbGRFcnJvcnMiOmZhbHNlLCJ0c2NvbmZpZ1BhdGgiOiJ0c2NvbmZpZy5qc29uIn0sImRpc3REaXIiOiIubmV4dCIsImNsZWFuRGlzdERpciI6dHJ1ZSwiYXNzZXRQcmVmaXgiOiIiLCJjYWNoZU1heE1lbW9yeVNpemUiOjUyNDI4ODAwLCJjb25maWdPcmlnaW4iOiJuZXh0LmNvbmZpZy5qcyIsInVzZUZpbGVTeXN0ZW1QdWJsaWNSb3V0ZXMiOnRydWUsImdlbmVyYXRlRXRhZ3MiOnRydWUsInBhZ2VFeHRlbnNpb25zIjpbInRzeCIsInRzIiwianN4IiwianMiXSwicG93ZXJlZEJ5SGVhZGVyIjp0cnVlLCJjb21wcmVzcyI6dHJ1ZSwiaW1hZ2VzIjp7ImRldmljZVNpemVzIjpbNjQwLDc1MCw4MjgsMTA4MCwxMjAwLDE5MjAsMjA0OCwzODQwXSwiaW1hZ2VTaXplcyI6WzE2LDMyLDQ4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nPWUzMCUzRCE=","sriEnabled":false,"middlewareConfig":"e30=","cacheHandlers":"{}"}!
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/lib/page-types.js
+      var page_types = __webpack_require__(6432);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/server/app-render/encryption-utils.js
+      var encryption_utils = __webpack_require__(7639);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/esm/server/app-render/action-utils.js
+      var action_utils = __webpack_require__(4520); // CONCATENATED MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js?{"absolute500Path":"","absoluteAppPath":"next/dist/pages/_app","absoluteDocumentPath":"next/dist/pages/_document","absoluteErrorPath":"next/dist/pages/_error","absolutePagePath":"private-next-app-dir/app-edge-ssr/page.js","dev":false,"isServerComponent":true,"page":"/app-edge-ssr/page","stringifiedConfig":"eyJlbnYiOnt9LCJlc2xpbnQiOnsiaWdub3JlRHVyaW5nQnVpbGRzIjpmYWxzZX0sInR5cGVzY3JpcHQiOnsiaWdub3JlQnVpbGRFcnJvcnMiOmZhbHNlLCJ0c2NvbmZpZ1BhdGgiOiJ0c2NvbmZpZy5qc29uIn0sImRpc3REaXIiOiIubmV4dCIsImNsZWFuRGlzdERpciI6dHJ1ZSwiYXNzZXRQcmVmaXgiOiIiLCJjYWNoZU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ZS1zc3IlMkZwYWdlLmpzJmFwcERpcj0lMkZ0bXAlMkZuZXh0LXN0YXRzUE5JUzVmJTJGc3RhdHMtYXBwJTJGYXBwJmFwcFBhdGhzPSUyRmFwcC1lZGdlLXNzciUyRnBhZ2UmcGFnZUV4dGVuc2lvbnM9dHN4JnBhZ2VFeHRlbnNpb25zPXRzJnBhZ2VFeHRlbnNpb25zPWpzeCZwYWdlRXh0ZW5zaW9ucz1qcyZiYXNlUGF0aD0mYXNzZXRQcmVmaXg9Jm5leHRDb25maWdPdXRwdXQ9JmZseWluZ1NodXR0bGU9ZmFsc2UmcHJlZmVycmVkUmVnaW9uPSZtaWRkbGV3YXJlQ29uZmlnPWUzMCUzRCE=","sriEnabled":false,"middlewareConfig":"e30=","cacheHandlers":"{}"}!
       var _self___RSC_MANIFEST;
 
       const incrementalCacheHandler = null;
@@ -460,105 +461,105 @@
       /***/
     },
 
-    /***/ 9576: /***/ (
+    /***/ 4547: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 7413)
+        __webpack_require__.bind(__webpack_require__, 5839)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 8359)
+        __webpack_require__.bind(__webpack_require__, 2805)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 1868)
+        __webpack_require__.bind(__webpack_require__, 5396)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 2834)
+        __webpack_require__.bind(__webpack_require__, 7887)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 5769)
+        __webpack_require__.bind(__webpack_require__, 1382)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 9400)
+        __webpack_require__.bind(__webpack_require__, 834)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 675)
+        __webpack_require__.bind(__webpack_require__, 5161)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 2832)
+        __webpack_require__.bind(__webpack_require__, 7854)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 2955)
+        __webpack_require__.bind(__webpack_require__, 732)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 9154)
+        __webpack_require__.bind(__webpack_require__, 5182)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 6005)
+        __webpack_require__.bind(__webpack_require__, 9663)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 6408)
+        __webpack_require__.bind(__webpack_require__, 718)
       );
 
       /***/
     },
 
-    /***/ 8644: /***/ (
+    /***/ 7512: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 7080)
+        __webpack_require__.bind(__webpack_require__, 1564)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3737)
+        __webpack_require__.bind(__webpack_require__, 4063)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3280)
+        __webpack_require__.bind(__webpack_require__, 6471)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 4055)
+        __webpack_require__.bind(__webpack_require__, 7519)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 7235)
+        __webpack_require__.bind(__webpack_require__, 4913)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 296)
+        __webpack_require__.bind(__webpack_require__, 1674)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 727)
+        __webpack_require__.bind(__webpack_require__, 7301)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 3900)
+        __webpack_require__.bind(__webpack_require__, 1069)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 2194)
+        __webpack_require__.bind(__webpack_require__, 9397)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 5159)
+        __webpack_require__.bind(__webpack_require__, 8871)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 6956)
+        __webpack_require__.bind(__webpack_require__, 9415)
       );
       Promise.resolve(/* import() eager */).then(
-        __webpack_require__.bind(__webpack_require__, 8640)
+        __webpack_require__.bind(__webpack_require__, 5279)
       );
 
       /***/
     },
 
-    /***/ 8412: /***/ () => {
+    /***/ 3124: /***/ () => {
       /***/
     },
 
-    /***/ 2331: /***/ () => {
+    /***/ 8312: /***/ () => {
       /***/
     },
 
-    /***/ 1937: /***/ (
+    /***/ 9042: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -578,7 +579,7 @@
       /***/
     },
 
-    /***/ 623: /***/ (
+    /***/ 4399: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -590,7 +591,7 @@
         /* harmony export */
       });
       /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
-        __webpack_require__(3419);
+        __webpack_require__(385);
 
       function RootLayout({ children }) {
         return /*#__PURE__*/ (0,
@@ -609,7 +610,7 @@
     // webpackRuntimeModules
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
-    /******/ __webpack_require__.O(0, [168, 833], () => __webpack_exec__(338));
+    /******/ __webpack_require__.O(0, [177, 632], () => __webpack_exec__(4898));
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ (_ENTRIES = typeof _ENTRIES === "undefined" ? {} : _ENTRIES)[
       "middleware_app/app-edge-ssr/page"
Diff for middleware.js

Diff too large to display

Diff for edge-ssr.js

Diff too large to display

Diff for image-HASH.js
@@ -1,7 +1,7 @@
 (self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
   [8358],
   {
-    /***/ 869: /***/ (
+    /***/ 1085: /***/ (
       __unused_webpack_module,
       __unused_webpack_exports,
       __webpack_require__
@@ -9,7 +9,7 @@
       (window.__NEXT_P = window.__NEXT_P || []).push([
         "/image",
         function () {
-          return __webpack_require__(8560);
+          return __webpack_require__(2864);
         },
       ]);
       if (false) {
@@ -18,7 +18,7 @@
       /***/
     },
 
-    /***/ 5689: /***/ (module, exports, __webpack_require__) => {
+    /***/ 1673: /***/ (module, exports, __webpack_require__) => {
       "use strict";
       /* __next_internal_client_entry_do_not_use__  cjs */
       Object.defineProperty(exports, "__esModule", {
@@ -40,17 +40,17 @@
         __webpack_require__(8693)
       );
       const _head = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(6998)
+        __webpack_require__(5838)
       );
-      const _getimgprops = __webpack_require__(5861);
-      const _imageconfig = __webpack_require__(1253);
-      const _imageconfigcontextsharedruntime = __webpack_require__(6305);
-      const _warnonce = __webpack_require__(1629);
-      const _routercontextsharedruntime = __webpack_require__(1616);
+      const _getimgprops = __webpack_require__(5726);
+      const _imageconfig = __webpack_require__(187);
+      const _imageconfigcontextsharedruntime = __webpack_require__(5786);
+      const _warnonce = __webpack_require__(3673);
+      const _routercontextsharedruntime = __webpack_require__(759);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(7106)
+        __webpack_require__(2182)
       );
-      const _usemergedref = __webpack_require__(9916);
+      const _usemergedref = __webpack_require__(9363);
       // This is replaced by webpack define plugin
       const configEnv = {
         deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -371,7 +371,7 @@
       /***/
     },
 
-    /***/ 9916: /***/ (module, exports, __webpack_require__) => {
+    /***/ 9363: /***/ (module, exports, __webpack_require__) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -432,7 +432,7 @@
       /***/
     },
 
-    /***/ 5861: /***/ (
+    /***/ 5726: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -448,9 +448,9 @@
           return getImgProps;
         },
       });
-      const _warnonce = __webpack_require__(1629);
-      const _imageblursvg = __webpack_require__(2040);
-      const _imageconfig = __webpack_require__(1253);
+      const _warnonce = __webpack_require__(3673);
+      const _imageblursvg = __webpack_require__(5499);
+      const _imageconfig = __webpack_require__(187);
       const VALID_LOADING_VALUES =
         /* unused pure expression or super */ null && [
           "lazy",
@@ -824,7 +824,7 @@
       /***/
     },
 
-    /***/ 2040: /***/ (__unused_webpack_module, exports) => {
+    /***/ 5499: /***/ (__unused_webpack_module, exports) => {
       "use strict";
       /**
        * A shared function, used on both client and server, to generate a SVG blur placeholder.
@@ -879,7 +879,7 @@
       /***/
     },
 
-    /***/ 4994: /***/ (
+    /***/ 6157: /***/ (
       __unused_webpack_module,
       exports,
       __webpack_require__
@@ -906,10 +906,10 @@
         },
       });
       const _interop_require_default = __webpack_require__(9608);
-      const _getimgprops = __webpack_require__(5861);
-      const _imagecomponent = __webpack_require__(5689);
+      const _getimgprops = __webpack_require__(5726);
+      const _imagecomponent = __webpack_require__(1673);
       const _imageloader = /*#__PURE__*/ _interop_require_default._(
-        __webpack_require__(7106)
+        __webpack_require__(2182)
       );
       function getImageProps(imgProps) {
         const { props } = (0, _getimgprops.getImgProps)(imgProps, {
@@ -941,7 +941,7 @@
       /***/
     },
 
-    /***/ 7106: /***/ (__unused_webpack_module, exports) => {
+    /***/ 2182: /***/ (__unused_webpack_module, exports) => {
       "use strict";
 
       Object.defineProperty(exports, "__esModule", {
@@ -976,7 +976,7 @@
       /***/
     },
 
-    /***/ 8560: /***/ (
+    /***/ 2864: /***/ (
       __unused_webpack_module,
       __webpack_exports__,
       __webpack_require__
@@ -993,8 +993,8 @@
 
       // EXTERNAL MODULE: ./node_modules/.pnpm/react@19.0.0-rc-7c8e5e7a-20241101/node_modules/react/jsx-runtime.js
       var jsx_runtime = __webpack_require__(2073);
-      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+main-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ngsqfltlxii45umrwe6rktuauy/node_modules/next/image.js
-      var next_image = __webpack_require__(4678);
+      // EXTERNAL MODULE: ./node_modules/.pnpm/next@file+..+diff-repo+packages+next+next-packed.tgz_react-dom@19.0.0-rc-7c8e5e7a-20241101_re_ay5jspqvpcpk5357qiimbatlya/node_modules/next/image.js
+      var next_image = __webpack_require__(9915);
       var image_default = /*#__PURE__*/ __webpack_require__.n(next_image); // CONCATENATED MODULE: ./pages/nextjs.png
       /* harmony default export */ const nextjs = {
         src: "/_next/static/media/nextjs.cae0b805.png",
@@ -1024,12 +1024,12 @@
       /***/
     },
 
-    /***/ 4678: /***/ (
+    /***/ 9915: /***/ (
       module,
       __unused_webpack_exports,
       __webpack_require__
     ) => {
-      module.exports = __webpack_require__(4994);
+      module.exports = __webpack_require__(6157);
 
       /***/
     },
@@ -1039,7 +1039,7 @@
     /******/ var __webpack_exec__ = (moduleId) =>
       __webpack_require__((__webpack_require__.s = moduleId));
     /******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
-      __webpack_exec__(869)
+      __webpack_exec__(1085)
     );
     /******/ var __webpack_exports__ = __webpack_require__.O();
     /******/ _N_E = __webpack_exports__;
Diff for app-page-exp..ntime.dev.js

Diff too large to display

Diff for app-page-exp..time.prod.js

Diff too large to display

Diff for app-page-tur..time.prod.js

Diff too large to display

Diff for app-page-tur..time.prod.js

Diff too large to display

Diff for app-page.runtime.dev.js

Diff too large to display

Diff for app-page.runtime.prod.js

Diff too large to display

Commit: 80ef83d

@acdlite acdlite marked this pull request as draft November 1, 2024 05:14
@acdlite acdlite force-pushed the generate-per-segment-prefetch branch 8 times, most recently from 04ba2f6 to 460ff7e Compare November 3, 2024 18:13
@acdlite acdlite marked this pull request as ready for review November 4, 2024 00:20
@acdlite acdlite force-pushed the generate-per-segment-prefetch branch 2 times, most recently from 9525b6c to 080b284 Compare November 4, 2024 01:46
fullPageDataBuffer: Buffer
serverConsumerManifest: any
segmentPath: Array<[string, Segment]>
}): Promise<any> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come this is any-typed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type system doesn't allow you to return arbitrary data from a React component. It expects a ReactNode. It works in the runtime, though; since this is a Server Component, in the resulting stream the element is transparent.

The reason I have to wrap it in a component is so that when we decode the original stream, the side effects are transferred to the new stream.

But to make it clearer I'll move the escape hatch to where the element is created, and add a comment.

@acdlite acdlite force-pushed the generate-per-segment-prefetch branch from 080b284 to 0a8a279 Compare November 4, 2024 19:08
Follow up to vercel#71113.

This generates a prefetch response for route segments, so the client
can request them individually, and reuse shared layouts between
separate page prefetches.

Since this is exclusive to PPR, segment prefetches are always static
and do not reach the application layer. They are served directly from
cache. (This part was implemented in the previous PR.)

The prerendered segment data is generated (and revalidated)
simultaneously with the prerender of the entire page, to ensure
consistency between parent and child segments. Since we always rebuild
the whole page, we can save an extra render of each segment by reusing
the Flight response that was used to generate the initial HTML.

We do this by decoding the page data using a server-side Flight
consumer, picking out an individual segment's data, then re-encoding it
as its own Flight response. We have to do this once per segment — not
ideal, but for now it's the only way to make sure the side effects from
the original Flight stream (e.g. Float preloads) are transferred to the
per-segment streams.

This PR does not yet include any updates to the client router.
@acdlite acdlite force-pushed the generate-per-segment-prefetch branch from 0a8a279 to 80ef83d Compare November 4, 2024 19:41
@acdlite
Copy link
Contributor Author

acdlite commented Nov 4, 2024

The last remaining failing test was fixed upstream so I'm going to merge as-is

@acdlite acdlite merged commit 3287d70 into vercel:canary Nov 4, 2024
82 of 85 checks passed
stipsan pushed a commit to sanity-io/next.js that referenced this pull request Nov 6, 2024
Follow up to vercel#71113.

This generates a prefetch response for route segments, so the client can
request them individually, and reuse shared layouts between separate
page prefetches.

Since this is exclusive to PPR, segment prefetches are always static and
do not reach the application layer. They are served directly from cache.
(This part was implemented in the previous PR.)

The prerendered segment data is generated (and revalidated)
simultaneously with the prerender of the entire page, to ensure
consistency between parent and child segments. Since we always rebuild
the whole page, we can save an extra render of each segment by reusing
the Flight response that was used to generate the initial HTML.

We do this by decoding the page data using a server-side Flight
consumer, picking out an individual segment's data, then re-encoding it
as its own Flight response. We have to do this once per segment — not
ideal, but for now it's the only way to make sure the side effects from
the original Flight stream (e.g. Float preloads) are transferred to the
per-segment streams.

This PR does not yet include any updates to the client router.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants