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

Add experimental per-page option to disable JS preloads #21329

Merged
merged 3 commits into from Jan 19, 2021

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Jan 19, 2021

As discussed with @csswizardry. This is a temporary option in case you know the preloads are not needed. It will likely be a default once the ScriptLoader work from @janicklas-ralph has been proven in partner apps and landed.

// pages/index.js
export const config = {
  unstable_JsPreload: false
}

As discussed with @csswizardry. This is a temporary option in case you know the preloads are not needed. It will likely be a default once the ScriptLoader work has been landed.
@timneutkens timneutkens requested review from ijjk, lfades and Timer as code owners Jan 19, 2021
@ijjk
Copy link
Member

ijjk commented Jan 19, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
buildDuration 10.6s 10.5s -183ms
nodeModulesSize 77.6 MB 77.6 MB ⚠️ +873 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
/ failed reqs 0 0
/ total time (seconds) 2.044 2.138 ⚠️ +0.09
/ avg req/sec 1222.94 1169.43 ⚠️ -53.51
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.308 1.349 ⚠️ +0.04
/error-in-render avg req/sec 1911.74 1853.33 ⚠️ -58.41
Client Bundles (main, webpack, commons)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
677f882d2ed8..43e3.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-9e3e4e6..2023.js gzip 6.63 kB 6.63 kB
webpack-50be..df5b.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
polyfills-af..9390.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
index.html gzip 614 B 614 B
link.html gzip 621 B 621 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
buildDuration 12.5s 12.8s ⚠️ +223ms
nodeModulesSize 77.6 MB 77.6 MB ⚠️ +873 B
Client Bundles (main, webpack, commons)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
677f882d2ed8..43e3.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-9e3e4e6..2023.js gzip 6.63 kB 6.63 kB
webpack-50be..df5b.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
polyfills-af..9390.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_error.js 1 MB 1 MB ⚠️ +214 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB ⚠️ +214 B
link.js 1.06 MB 1.06 MB ⚠️ +214 B
routerDirect.js 1.05 MB 1.05 MB ⚠️ +214 B
withRouter.js 1.05 MB 1.05 MB ⚠️ +214 B
Overall change 5.18 MB 5.19 MB ⚠️ +1.07 kB

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
buildDuration 13.3s 13.3s -62ms
nodeModulesSize 77.6 MB 77.6 MB ⚠️ +873 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
/ failed reqs 0 0
/ total time (seconds) 2.057 2.074 ⚠️ +0.02
/ avg req/sec 1215.62 1205.66 ⚠️ -9.96
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.257 1.307 ⚠️ +0.05
/error-in-render avg req/sec 1989.62 1913.43 ⚠️ -76.19
Client Bundles (main, webpack, commons)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
597-3bd7d6bd..868b.js gzip 13 kB 13 kB
778-d412f8e7..3ee1.js gzip 6.56 kB 6.56 kB
838-adcbad39..6e83.js gzip 31.1 kB 31.1 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-6a6a792..6877.js gzip 96 B 96 B
webpack-e302..54e9.js gzip 954 B 954 B
Overall change 91 kB 91 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
polyfills-a0..538c.js gzip 88 B 88 B
Overall change 88 B 88 B
Client Pages
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_app-a5b2e84..33cf.js gzip 1.26 kB 1.26 kB
_error-6f1f9..5577.js gzip 3.38 kB 3.38 kB
hooks-725de8..0a15.js gzip 904 B 904 B
index-939503..6e1c.js gzip 232 B 232 B
link-e0cc871..fdbb.js gzip 1.63 kB 1.63 kB
routerDirect..9360.js gzip 308 B 308 B
withRouter-6..44ec.js gzip 304 B 304 B
Overall change 8.02 kB 8.02 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_buildManifest.js gzip 299 B 299 B
Overall change 299 B 299 B
Rendered Page Sizes
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
index.html gzip 585 B 585 B
link.html gzip 592 B 592 B
withRouter.html gzip 581 B 581 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for index.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "b9-e7tBhtYbQws1OO3aaW",
+        "buildId": "-FY2759iALpjjePvqM_5H",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/b9-e7tBhtYbQws1OO3aaW/_buildManifest.js"
+      src="/_next/static/-FY2759iALpjjePvqM_5H/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/b9-e7tBhtYbQws1OO3aaW/_ssgManifest.js"
+      src="/_next/static/-FY2759iALpjjePvqM_5H/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "b9-e7tBhtYbQws1OO3aaW",
+        "buildId": "-FY2759iALpjjePvqM_5H",
         "isFallback": false,
         "gip": true
       }
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/b9-e7tBhtYbQws1OO3aaW/_buildManifest.js"
+      src="/_next/static/-FY2759iALpjjePvqM_5H/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/b9-e7tBhtYbQws1OO3aaW/_ssgManifest.js"
+      src="/_next/static/-FY2759iALpjjePvqM_5H/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "b9-e7tBhtYbQws1OO3aaW",
+        "buildId": "-FY2759iALpjjePvqM_5H",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/b9-e7tBhtYbQws1OO3aaW/_buildManifest.js"
+      src="/_next/static/-FY2759iALpjjePvqM_5H/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/b9-e7tBhtYbQws1OO3aaW/_ssgManifest.js"
+      src="/_next/static/-FY2759iALpjjePvqM_5H/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 6d7688d

ijjk
ijjk approved these changes Jan 19, 2021
@ijjk
Copy link
Member

ijjk commented Jan 19, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
buildDuration 8.9s 9s ⚠️ +180ms
nodeModulesSize 77.6 MB 77.6 MB ⚠️ +873 B
Page Load Tests Overall increase ✓
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
/ failed reqs 0 0
/ total time (seconds) 1.79 1.769 -0.02
/ avg req/sec 1397 1412.96 +15.96
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.21 1.145 -0.06
/error-in-render avg req/sec 2066.02 2182.91 +116.89
Client Bundles (main, webpack, commons)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
677f882d2ed8..43e3.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-9e3e4e6..2023.js gzip 6.63 kB 6.63 kB
webpack-50be..df5b.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
polyfills-af..9390.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
index.html gzip 614 B 614 B
link.html gzip 621 B 621 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
buildDuration 10.7s 10.3s -467ms
nodeModulesSize 77.6 MB 77.6 MB ⚠️ +873 B
Client Bundles (main, webpack, commons)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
677f882d2ed8..43e3.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-9e3e4e6..2023.js gzip 6.63 kB 6.63 kB
webpack-50be..df5b.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
polyfills-af..9390.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_error.js 1 MB 1 MB ⚠️ +214 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB ⚠️ +214 B
link.js 1.06 MB 1.06 MB ⚠️ +214 B
routerDirect.js 1.05 MB 1.05 MB ⚠️ +214 B
withRouter.js 1.05 MB 1.05 MB ⚠️ +214 B
Overall change 5.18 MB 5.19 MB ⚠️ +1.07 kB

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
buildDuration 11s 11.1s ⚠️ +117ms
nodeModulesSize 77.6 MB 77.6 MB ⚠️ +873 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
/ failed reqs 0 0
/ total time (seconds) 1.718 1.752 ⚠️ +0.03
/ avg req/sec 1454.83 1426.87 ⚠️ -27.96
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.108 1.114 ⚠️ +0.01
/error-in-render avg req/sec 2256.94 2244.85 ⚠️ -12.09
Client Bundles (main, webpack, commons)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
597-3bd7d6bd..868b.js gzip 13 kB 13 kB
778-d412f8e7..3ee1.js gzip 6.56 kB 6.56 kB
838-adcbad39..6e83.js gzip 31.1 kB 31.1 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-6a6a792..6877.js gzip 96 B 96 B
webpack-e302..54e9.js gzip 954 B 954 B
Overall change 91 kB 91 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
polyfills-a0..538c.js gzip 88 B 88 B
Overall change 88 B 88 B
Client Pages
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_app-a5b2e84..33cf.js gzip 1.26 kB 1.26 kB
_error-6f1f9..5577.js gzip 3.38 kB 3.38 kB
hooks-725de8..0a15.js gzip 904 B 904 B
index-939503..6e1c.js gzip 232 B 232 B
link-e0cc871..fdbb.js gzip 1.63 kB 1.63 kB
routerDirect..9360.js gzip 308 B 308 B
withRouter-6..44ec.js gzip 304 B 304 B
Overall change 8.02 kB 8.02 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_buildManifest.js gzip 299 B 299 B
Overall change 299 B 299 B
Rendered Page Sizes
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
index.html gzip 585 B 585 B
link.html gzip 592 B 592 B
withRouter.html gzip 581 B 581 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for index.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "Fde7r24ZP4HpB7XT7thXM",
+        "buildId": "h_mYoyop25XZ0ecILaG6J",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/Fde7r24ZP4HpB7XT7thXM/_buildManifest.js"
+      src="/_next/static/h_mYoyop25XZ0ecILaG6J/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/Fde7r24ZP4HpB7XT7thXM/_ssgManifest.js"
+      src="/_next/static/h_mYoyop25XZ0ecILaG6J/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "Fde7r24ZP4HpB7XT7thXM",
+        "buildId": "h_mYoyop25XZ0ecILaG6J",
         "isFallback": false,
         "gip": true
       }
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/Fde7r24ZP4HpB7XT7thXM/_buildManifest.js"
+      src="/_next/static/h_mYoyop25XZ0ecILaG6J/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/Fde7r24ZP4HpB7XT7thXM/_ssgManifest.js"
+      src="/_next/static/h_mYoyop25XZ0ecILaG6J/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "Fde7r24ZP4HpB7XT7thXM",
+        "buildId": "h_mYoyop25XZ0ecILaG6J",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/Fde7r24ZP4HpB7XT7thXM/_buildManifest.js"
+      src="/_next/static/h_mYoyop25XZ0ecILaG6J/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/Fde7r24ZP4HpB7XT7thXM/_ssgManifest.js"
+      src="/_next/static/h_mYoyop25XZ0ecILaG6J/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 9306279

@ijjk

This comment has been minimized.

@ijjk
Copy link
Member

ijjk commented Jan 19, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
buildDuration 8.8s 8.8s -29ms
nodeModulesSize 77.6 MB 77.6 MB ⚠️ +873 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
/ failed reqs 0 0
/ total time (seconds) 1.7 1.724 ⚠️ +0.02
/ avg req/sec 1470.83 1449.86 ⚠️ -20.97
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.086 1.102 ⚠️ +0.02
/error-in-render avg req/sec 2301.33 2269.16 ⚠️ -32.17
Client Bundles (main, webpack, commons)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
677f882d2ed8..43e3.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
index.html gzip 614 B 614 B
link.html gzip 621 B 621 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
buildDuration 10.4s 10.3s -122ms
nodeModulesSize 77.6 MB 77.6 MB ⚠️ +873 B
Client Bundles (main, webpack, commons)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
677f882d2ed8..43e3.js gzip 13.1 kB 13.1 kB
framework.HASH.js gzip 39 kB 39 kB
main-HASH.js gzip 6.63 kB 6.63 kB
webpack-HASH.js gzip 751 B 751 B
Overall change 59.4 kB 59.4 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
polyfills-HASH.js gzip 31.3 kB 31.3 kB
Overall change 31.3 kB 31.3 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_app-2a09aa2..4a98.js gzip 1.28 kB 1.28 kB
_error-8b758..aef6.js gzip 3.46 kB 3.46 kB
hooks-c71ae4..70cd.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-7faf09b..eba4.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_error.js 1 MB 1 MB ⚠️ +214 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB ⚠️ +214 B
link.js 1.06 MB 1.06 MB ⚠️ +214 B
routerDirect.js 1.05 MB 1.05 MB ⚠️ +214 B
withRouter.js 1.05 MB 1.05 MB ⚠️ +214 B
Overall change 5.18 MB 5.19 MB ⚠️ +1.07 kB

Webpack 5 Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
buildDuration 10.6s 10.8s ⚠️ +221ms
nodeModulesSize 77.6 MB 77.6 MB ⚠️ +873 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
/ failed reqs 0 0
/ total time (seconds) 1.679 1.778 ⚠️ +0.1
/ avg req/sec 1488.74 1406.17 ⚠️ -82.57
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.076 1.114 ⚠️ +0.04
/error-in-render avg req/sec 2324.24 2243.4 ⚠️ -80.84
Client Bundles (main, webpack, commons)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
597-3bd7d6bd..868b.js gzip 13 kB 13 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 6.58 kB 6.58 kB
webpack-HASH.js gzip 954 B 954 B
Overall change 59.8 kB 59.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
polyfills-HASH.js gzip 31.1 kB 31.1 kB
Overall change 31.1 kB 31.1 kB
Client Pages
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_app-a5b2e84..33cf.js gzip 1.26 kB 1.26 kB
_error-6f1f9..5577.js gzip 3.38 kB 3.38 kB
hooks-725de8..0a15.js gzip 904 B 904 B
index-939503..6e1c.js gzip 232 B 232 B
link-e0cc871..fdbb.js gzip 1.63 kB 1.63 kB
routerDirect..9360.js gzip 308 B 308 B
withRouter-6..44ec.js gzip 304 B 304 B
Overall change 8.02 kB 8.02 kB
Client Build Manifests
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
_buildManifest.js gzip 299 B 299 B
Overall change 299 B 299 B
Rendered Page Sizes
vercel/next.js canary timneutkens/next.js add/unstable-jspreload-disable Change
index.html gzip 587 B 587 B
link.html gzip 592 B 592 B
withRouter.html gzip 580 B 580 B
Overall change 1.76 kB 1.76 kB

Diffs

Diff for index.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "2MhYPECbED3CzdfJpdaUk",
+        "buildId": "QtNOShmVTnE4l1OFMCIc2",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/2MhYPECbED3CzdfJpdaUk/_buildManifest.js"
+      src="/_next/static/QtNOShmVTnE4l1OFMCIc2/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/2MhYPECbED3CzdfJpdaUk/_ssgManifest.js"
+      src="/_next/static/QtNOShmVTnE4l1OFMCIc2/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "2MhYPECbED3CzdfJpdaUk",
+        "buildId": "QtNOShmVTnE4l1OFMCIc2",
         "isFallback": false,
         "gip": true
       }
@@ -82,11 +82,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/2MhYPECbED3CzdfJpdaUk/_buildManifest.js"
+      src="/_next/static/QtNOShmVTnE4l1OFMCIc2/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/2MhYPECbED3CzdfJpdaUk/_ssgManifest.js"
+      src="/_next/static/QtNOShmVTnE4l1OFMCIc2/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -43,7 +43,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "2MhYPECbED3CzdfJpdaUk",
+        "buildId": "QtNOShmVTnE4l1OFMCIc2",
         "isFallback": false,
         "gip": true
       }
@@ -77,11 +77,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/2MhYPECbED3CzdfJpdaUk/_buildManifest.js"
+      src="/_next/static/QtNOShmVTnE4l1OFMCIc2/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/2MhYPECbED3CzdfJpdaUk/_ssgManifest.js"
+      src="/_next/static/QtNOShmVTnE4l1OFMCIc2/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 4835efb

@csswizardry
Copy link

csswizardry commented Jan 19, 2021

Thanks so much for breaking ground on this—I’m very grateful.

@kodiakhq kodiakhq bot merged commit 56b149f into vercel:canary Jan 19, 2021
29 checks passed
@spanicker
Copy link

spanicker commented Jan 19, 2021

FWIW, we are only asking folks to preload assets critical for FCP & LCP (critical CSS, fonts, hero image)
I'm not sure why we need to expose a flag at this moment, when there is active project work to investigate switching away from preload (+async) for self bundled JS.
It's best to retain control of the loading order within the framework, so that we have the ability to make a different decision in the near future (defer vs async etc)

@timneutkens
Copy link
Member Author

timneutkens commented Jan 20, 2021

It's best to retain control of the loading order within the framework

The preloads can only be disabled with this option, not enabled. Meaning that later on we can make these changes either way. It's also marked as unstable_ (can be removed anytime), so this really is just a temporary stopgap for cases where it makes sense to defer fetching the bundles. The moment we have the better solution this flag can be removed. It would also allow Ralph to verify this change against partner apps.

@timneutkens timneutkens deleted the add/unstable-jspreload-disable branch Jan 20, 2021
@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
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.

None yet

4 participants