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

Convert link to function component #14633

Merged
merged 10 commits into from
Jul 2, 2020
Merged

Conversation

Janpot
Copy link
Contributor

@Janpot Janpot commented Jun 27, 2020

Convert Link to a function component. Prefetch logic and memoized url formatting now meshes nicely with React hooks. Class methods were hoisted to module scope to preserve performance characteristics.

@ijjk
Copy link
Member

ijjk commented Jun 27, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 9.1s 9.1s ⚠️ +2ms
nodeModulesSize 67.1 MB 67.1 MB -1.49 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js convert-link Change
/ failed reqs 0 0
/ total time (seconds) 1.472 1.548 ⚠️ +0.08
/ avg req/sec 1698.48 1615.29 -83.19
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 0.889 0.859 -0.03
/error-in-render avg req/sec 2813.35 2910.19 ⚠️ +96.84
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 267 B -1 B
_buildManife..dule.js gzip 272 B 273 B ⚠️ +1 B
Overall change 540 B 540 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
index.html gzip 953 B 953 B
link.html gzip 959 B 960 B ⚠️ +1 B
withRouter.html gzip 946 B 946 B
Overall change 2.86 kB 2.86 kB ⚠️ +1 B

Diffs

Diff for _buildManifest.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-f35cd1774d910f5523ed.js"],
   "/_error": ["static\u002Fpages\u002F_error-f39e6723c6acde17325a.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-9e216cd51bf04b309e08.js"],
-  "/link": ["static\u002Fpages\u002Flink-ea0e37d2bb8e9a79e823.js"],
+  "/link": ["static\u002Fpages\u002Flink-44e0244db86419f82988.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-b95d3f54c75949a43da6.js"
   ],
Diff for _buildManifest.module.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-da343bca3b67f1bcf42d.module.js"],
   "/_error": ["static\u002Fpages\u002F_error-b3c4c3f8dbb1417657e6.module.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-dc8f274035a2839a1e61.module.js"],
-  "/link": ["static\u002Fpages\u002Flink-bce06ba269911a3c4c29.module.js"],
+  "/link": ["static\u002Fpages\u002Flink-b99f4b4b1188cd10ff3e.module.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-c62f258dff7fece0a732.module.js"
   ],
Diff for link.html
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      href="/_next/static/pages/link-b99f4b4b1188cd10ff3e.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -146,13 +146,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/pages/link-ea0e37d2bb8e9a79e823.js"
+      src="/_next/static/pages/link-44e0244db86419f82988.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      src="/_next/static/pages/link-b99f4b4b1188cd10ff3e.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 9.7s 9.5s -164ms
nodeModulesSize 67.1 MB 67.1 MB -1.49 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 267 B -1 B
_buildManife..dule.js gzip 272 B 273 B ⚠️ +1 B
Overall change 540 B 540 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 876 kB 876 kB
link.js 916 kB 915 kB -775 B
routerDirect.js 908 kB 908 kB
withRouter.js 908 kB 908 kB
Overall change 4.49 MB 4.49 MB -775 B
Commit: 94faa6b

@ijjk
Copy link
Member

ijjk commented Jun 27, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 12.1s 12.4s ⚠️ +317ms
nodeModulesSize 67.1 MB 67.1 MB -1.76 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js convert-link Change
/ failed reqs 0 0
/ total time (seconds) 2.19 2.094 -0.1
/ avg req/sec 1141.39 1193.91 ⚠️ +52.52
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.468 1.332 -0.14
/error-in-render avg req/sec 1702.66 1877.39 ⚠️ +174.73
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests Overall increase ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 273 B ⚠️ +1 B
Overall change 540 B 541 B ⚠️ +1 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
index.html gzip 954 B 954 B
link.html gzip 959 B 961 B ⚠️ +2 B
withRouter.html gzip 947 B 947 B
Overall change 2.86 kB 2.86 kB ⚠️ +2 B

Diffs

Diff for _buildManifest.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-f35cd1774d910f5523ed.js"],
   "/_error": ["static\u002Fpages\u002F_error-f39e6723c6acde17325a.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-9e216cd51bf04b309e08.js"],
-  "/link": ["static\u002Fpages\u002Flink-ea0e37d2bb8e9a79e823.js"],
+  "/link": ["static\u002Fpages\u002Flink-e3e0634c6aa0536227ca.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-b95d3f54c75949a43da6.js"
   ],
Diff for _buildManifest.module.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-da343bca3b67f1bcf42d.module.js"],
   "/_error": ["static\u002Fpages\u002F_error-b3c4c3f8dbb1417657e6.module.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-dc8f274035a2839a1e61.module.js"],
-  "/link": ["static\u002Fpages\u002Flink-bce06ba269911a3c4c29.module.js"],
+  "/link": ["static\u002Fpages\u002Flink-44e86c6ddc46f5899445.module.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-c62f258dff7fece0a732.module.js"
   ],
Diff for link.html
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      href="/_next/static/pages/link-44e86c6ddc46f5899445.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -146,13 +146,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/pages/link-ea0e37d2bb8e9a79e823.js"
+      src="/_next/static/pages/link-e3e0634c6aa0536227ca.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      src="/_next/static/pages/link-44e86c6ddc46f5899445.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 12.9s 14.3s ⚠️ +1.4s
nodeModulesSize 67.1 MB 67.1 MB -1.76 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests Overall increase ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 273 B ⚠️ +1 B
Overall change 540 B 541 B ⚠️ +1 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 876 kB 876 kB
link.js 916 kB 915 kB -871 B
routerDirect.js 908 kB 908 kB
withRouter.js 908 kB 908 kB
Overall change 4.49 MB 4.49 MB -871 B
Commit: 6c5ecc2

@ijjk
Copy link
Member

ijjk commented Jun 27, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 12.5s 12.6s ⚠️ +99ms
nodeModulesSize 67.1 MB 67.1 MB -1.81 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
/ failed reqs 0 0
/ total time (seconds) 2.036 2.204 ⚠️ +0.17
/ avg req/sec 1227.74 1134.14 -93.6
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.541 1.496 -0.04
/error-in-render avg req/sec 1621.91 1670.89 ⚠️ +48.98
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests Overall increase ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 273 B ⚠️ +1 B
Overall change 540 B 541 B ⚠️ +1 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js convert-link Change
index.html gzip 954 B 954 B
link.html gzip 959 B 959 B
withRouter.html gzip 947 B 947 B
Overall change 2.86 kB 2.86 kB

Diffs

Diff for _buildManifest.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-f35cd1774d910f5523ed.js"],
   "/_error": ["static\u002Fpages\u002F_error-f39e6723c6acde17325a.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-9e216cd51bf04b309e08.js"],
-  "/link": ["static\u002Fpages\u002Flink-ea0e37d2bb8e9a79e823.js"],
+  "/link": ["static\u002Fpages\u002Flink-d6a7421e3c46542ec2c6.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-b95d3f54c75949a43da6.js"
   ],
Diff for _buildManifest.module.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-da343bca3b67f1bcf42d.module.js"],
   "/_error": ["static\u002Fpages\u002F_error-b3c4c3f8dbb1417657e6.module.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-dc8f274035a2839a1e61.module.js"],
-  "/link": ["static\u002Fpages\u002Flink-bce06ba269911a3c4c29.module.js"],
+  "/link": ["static\u002Fpages\u002Flink-74a25218a75cf053e0ed.module.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-c62f258dff7fece0a732.module.js"
   ],
Diff for link.html
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      href="/_next/static/pages/link-74a25218a75cf053e0ed.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -146,13 +146,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/pages/link-ea0e37d2bb8e9a79e823.js"
+      src="/_next/static/pages/link-d6a7421e3c46542ec2c6.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      src="/_next/static/pages/link-74a25218a75cf053e0ed.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 12.8s 13.3s ⚠️ +484ms
nodeModulesSize 67.1 MB 67.1 MB -1.81 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests Overall increase ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 273 B ⚠️ +1 B
Overall change 540 B 541 B ⚠️ +1 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 876 kB 876 kB
link.js 916 kB 915 kB -934 B
routerDirect.js 908 kB 908 kB
withRouter.js 908 kB 908 kB
Overall change 4.49 MB 4.49 MB -934 B
Commit: 7278c65

@ijjk
Copy link
Member

ijjk commented Jun 27, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 11.8s 11.6s -201ms
nodeModulesSize 67.1 MB 67.1 MB -1.86 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
/ failed reqs 0 0
/ total time (seconds) 1.965 1.943 -0.02
/ avg req/sec 1272.03 1286.56 ⚠️ +14.53
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.173 1.198 ⚠️ +0.02
/error-in-render avg req/sec 2131.95 2086.49 -45.46
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 267 B -1 B
_buildManife..dule.js gzip 272 B 273 B ⚠️ +1 B
Overall change 540 B 540 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js convert-link Change
index.html gzip 954 B 954 B
link.html gzip 959 B 959 B
withRouter.html gzip 947 B 947 B
Overall change 2.86 kB 2.86 kB

Diffs

Diff for _buildManifest.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-f35cd1774d910f5523ed.js"],
   "/_error": ["static\u002Fpages\u002F_error-f39e6723c6acde17325a.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-9e216cd51bf04b309e08.js"],
-  "/link": ["static\u002Fpages\u002Flink-ea0e37d2bb8e9a79e823.js"],
+  "/link": ["static\u002Fpages\u002Flink-fc1d9c5f9436a503a0ad.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-b95d3f54c75949a43da6.js"
   ],
Diff for _buildManifest.module.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-da343bca3b67f1bcf42d.module.js"],
   "/_error": ["static\u002Fpages\u002F_error-b3c4c3f8dbb1417657e6.module.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-dc8f274035a2839a1e61.module.js"],
-  "/link": ["static\u002Fpages\u002Flink-bce06ba269911a3c4c29.module.js"],
+  "/link": ["static\u002Fpages\u002Flink-058c72028f34395f0f07.module.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-c62f258dff7fece0a732.module.js"
   ],
Diff for link.html
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      href="/_next/static/pages/link-058c72028f34395f0f07.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -146,13 +146,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/pages/link-ea0e37d2bb8e9a79e823.js"
+      src="/_next/static/pages/link-fc1d9c5f9436a503a0ad.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      src="/_next/static/pages/link-058c72028f34395f0f07.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 12.7s 12.6s -104ms
nodeModulesSize 67.1 MB 67.1 MB -1.86 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 267 B -1 B
_buildManife..dule.js gzip 272 B 273 B ⚠️ +1 B
Overall change 540 B 540 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 876 kB 876 kB
link.js 916 kB 915 kB -931 B
routerDirect.js 908 kB 908 kB
withRouter.js 908 kB 908 kB
Overall change 4.49 MB 4.49 MB -931 B
Commit: 3e23fda

@ijjk
Copy link
Member

ijjk commented Jun 27, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 13.1s 13.2s ⚠️ +118ms
nodeModulesSize 67.1 MB 67.1 MB -1.86 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
/ failed reqs 0 0
/ total time (seconds) 2.252 2.264 ⚠️ +0.01
/ avg req/sec 1109.88 1104.44 -5.44
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.489 1.548 ⚠️ +0.06
/error-in-render avg req/sec 1678.9 1614.58 -64.32
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 267 B -1 B
_buildManife..dule.js gzip 272 B 273 B ⚠️ +1 B
Overall change 540 B 540 B
Rendered Page Sizes
vercel/next.js canary Janpot/next.js convert-link Change
index.html gzip 954 B 954 B
link.html gzip 959 B 959 B
withRouter.html gzip 947 B 947 B
Overall change 2.86 kB 2.86 kB

Diffs

Diff for _buildManifest.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-f35cd1774d910f5523ed.js"],
   "/_error": ["static\u002Fpages\u002F_error-f39e6723c6acde17325a.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-9e216cd51bf04b309e08.js"],
-  "/link": ["static\u002Fpages\u002Flink-ea0e37d2bb8e9a79e823.js"],
+  "/link": ["static\u002Fpages\u002Flink-fc1d9c5f9436a503a0ad.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-b95d3f54c75949a43da6.js"
   ],
Diff for _buildManifest.module.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-da343bca3b67f1bcf42d.module.js"],
   "/_error": ["static\u002Fpages\u002F_error-b3c4c3f8dbb1417657e6.module.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-dc8f274035a2839a1e61.module.js"],
-  "/link": ["static\u002Fpages\u002Flink-bce06ba269911a3c4c29.module.js"],
+  "/link": ["static\u002Fpages\u002Flink-058c72028f34395f0f07.module.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-c62f258dff7fece0a732.module.js"
   ],
Diff for link.html
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      href="/_next/static/pages/link-058c72028f34395f0f07.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -146,13 +146,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/pages/link-ea0e37d2bb8e9a79e823.js"
+      src="/_next/static/pages/link-fc1d9c5f9436a503a0ad.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      src="/_next/static/pages/link-058c72028f34395f0f07.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 13.9s 14.1s ⚠️ +234ms
nodeModulesSize 67.1 MB 67.1 MB -1.86 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 267 B -1 B
_buildManife..dule.js gzip 272 B 273 B ⚠️ +1 B
Overall change 540 B 540 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 876 kB 876 kB
link.js 916 kB 915 kB -931 B
routerDirect.js 908 kB 908 kB
withRouter.js 908 kB 908 kB
Overall change 4.49 MB 4.49 MB -931 B
Commit: cd46302

@Janpot Janpot marked this pull request as ready for review June 27, 2020 20:49
@ijjk
Copy link
Member

ijjk commented Jun 27, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 12.8s 12.8s -61ms
nodeModulesSize 67.1 MB 67.1 MB -2.47 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js convert-link Change
/ failed reqs 0 0
/ total time (seconds) 2.069 2.084 ⚠️ +0.02
/ avg req/sec 1208.09 1199.81 -8.28
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.357 1.34 -0.02
/error-in-render avg req/sec 1841.72 1866.21 ⚠️ +24.49
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 267 B -1 B
_buildManife..dule.js gzip 272 B 271 B -1 B
Overall change 540 B 538 B -2 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
index.html gzip 954 B 954 B
link.html gzip 959 B 960 B ⚠️ +1 B
withRouter.html gzip 947 B 947 B
Overall change 2.86 kB 2.86 kB ⚠️ +1 B

Diffs

Diff for _buildManifest.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-f35cd1774d910f5523ed.js"],
   "/_error": ["static\u002Fpages\u002F_error-f39e6723c6acde17325a.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-9e216cd51bf04b309e08.js"],
-  "/link": ["static\u002Fpages\u002Flink-ea0e37d2bb8e9a79e823.js"],
+  "/link": ["static\u002Fpages\u002Flink-4acc8290ce3b7885ccbc.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-b95d3f54c75949a43da6.js"
   ],
Diff for _buildManifest.module.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-da343bca3b67f1bcf42d.module.js"],
   "/_error": ["static\u002Fpages\u002F_error-b3c4c3f8dbb1417657e6.module.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-dc8f274035a2839a1e61.module.js"],
-  "/link": ["static\u002Fpages\u002Flink-bce06ba269911a3c4c29.module.js"],
+  "/link": ["static\u002Fpages\u002Flink-b345a7b6812d78cfeb7d.module.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-c62f258dff7fece0a732.module.js"
   ],
Diff for link.html
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      href="/_next/static/pages/link-b345a7b6812d78cfeb7d.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -146,13 +146,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/pages/link-ea0e37d2bb8e9a79e823.js"
+      src="/_next/static/pages/link-4acc8290ce3b7885ccbc.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      src="/_next/static/pages/link-b345a7b6812d78cfeb7d.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 13.5s 13.8s ⚠️ +275ms
nodeModulesSize 67.1 MB 67.1 MB -2.47 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 267 B -1 B
_buildManife..dule.js gzip 272 B 271 B -1 B
Overall change 540 B 538 B -2 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 876 kB 876 kB
link.js 916 kB 915 kB -1.15 kB
routerDirect.js 908 kB 908 kB
withRouter.js 908 kB 908 kB
Overall change 4.49 MB 4.49 MB -1.15 kB
Commit: a8534bc

@ijjk
Copy link
Member

ijjk commented Jun 28, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 11s 12.1s ⚠️ +1.1s
nodeModulesSize 67.1 MB 67.1 MB -2.47 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Janpot/next.js convert-link Change
/ failed reqs 0 0
/ total time (seconds) 1.912 1.891 -0.02
/ avg req/sec 1307.63 1321.81 ⚠️ +14.18
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.237 1.228 -0.01
/error-in-render avg req/sec 2021.82 2036.2 ⚠️ +14.38
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 267 B -1 B
_buildManife..dule.js gzip 272 B 271 B -1 B
Overall change 540 B 538 B -2 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
index.html gzip 954 B 954 B
link.html gzip 959 B 960 B ⚠️ +1 B
withRouter.html gzip 947 B 947 B
Overall change 2.86 kB 2.86 kB ⚠️ +1 B

Diffs

Diff for _buildManifest.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-f35cd1774d910f5523ed.js"],
   "/_error": ["static\u002Fpages\u002F_error-f39e6723c6acde17325a.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-9e216cd51bf04b309e08.js"],
-  "/link": ["static\u002Fpages\u002Flink-ea0e37d2bb8e9a79e823.js"],
+  "/link": ["static\u002Fpages\u002Flink-4acc8290ce3b7885ccbc.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-b95d3f54c75949a43da6.js"
   ],
Diff for _buildManifest.module.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-da343bca3b67f1bcf42d.module.js"],
   "/_error": ["static\u002Fpages\u002F_error-b3c4c3f8dbb1417657e6.module.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-dc8f274035a2839a1e61.module.js"],
-  "/link": ["static\u002Fpages\u002Flink-bce06ba269911a3c4c29.module.js"],
+  "/link": ["static\u002Fpages\u002Flink-b345a7b6812d78cfeb7d.module.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-c62f258dff7fece0a732.module.js"
   ],
Diff for link.html
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      href="/_next/static/pages/link-b345a7b6812d78cfeb7d.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -146,13 +146,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/pages/link-ea0e37d2bb8e9a79e823.js"
+      src="/_next/static/pages/link-4acc8290ce3b7885ccbc.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/pages/link-bce06ba269911a3c4c29.module.js"
+      src="/_next/static/pages/link-b345a7b6812d78cfeb7d.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 11.1s 11.9s ⚠️ +855ms
nodeModulesSize 67.1 MB 67.1 MB -2.47 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.51 kB 6.51 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..558d.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.59 kB 5.59 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.08 kB 7.08 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.6 kB 52.6 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 267 B -1 B
_buildManife..dule.js gzip 272 B 271 B -1 B
Overall change 540 B 538 B -2 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 876 kB 876 kB
link.js 916 kB 915 kB -1.15 kB
routerDirect.js 908 kB 908 kB
withRouter.js 908 kB 908 kB
Overall change 4.49 MB 4.49 MB -1.15 kB
Commit: 8a351b9

kodiakhq bot pushed a commit that referenced this pull request Jun 29, 2020
Add tests and fix for when the url contains query parameters.
`router` now uses the same method for formatting url+as pair as `Link`, will be able to share code after #14633 is merged
@ijjk
Copy link
Member

ijjk commented Jun 30, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 13.3s 13.3s -2ms
nodeModulesSize 66 MB 66 MB -2.47 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
/ failed reqs 0 0
/ total time (seconds) 2.31 2.274 -0.04
/ avg req/sec 1082.2 1099.33 +17.13
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.475 1.516 ⚠️ +0.04
/error-in-render avg req/sec 1695.45 1649.46 ⚠️ -45.99
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.59 kB 6.59 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..769f.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.2 kB 57.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.68 kB 5.68 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.09 kB 7.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.7 kB 52.7 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 540 B 540 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
index.html gzip 951 B 951 B
link.html gzip 960 B 957 B -3 B
withRouter.html gzip 943 B 943 B
Overall change 2.85 kB 2.85 kB -3 B

Diffs

Diff for _buildManifest.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-f35cd1774d910f5523ed.js"],
   "/_error": ["static\u002Fpages\u002F_error-f39e6723c6acde17325a.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-9e216cd51bf04b309e08.js"],
-  "/link": ["static\u002Fpages\u002Flink-812a420dce76d6a59580.js"],
+  "/link": ["static\u002Fpages\u002Flink-4ce0c7178d36c3b390c2.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-b95d3f54c75949a43da6.js"
   ],
Diff for _buildManifest.module.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-da343bca3b67f1bcf42d.module.js"],
   "/_error": ["static\u002Fpages\u002F_error-b3c4c3f8dbb1417657e6.module.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-dc8f274035a2839a1e61.module.js"],
-  "/link": ["static\u002Fpages\u002Flink-990485957f128708c04b.module.js"],
+  "/link": ["static\u002Fpages\u002Flink-4c38d18e319a774ec055.module.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-c62f258dff7fece0a732.module.js"
   ],
Diff for link.html
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/pages/link-990485957f128708c04b.module.js"
+      href="/_next/static/pages/link-4c38d18e319a774ec055.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -146,13 +146,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/pages/link-812a420dce76d6a59580.js"
+      src="/_next/static/pages/link-4ce0c7178d36c3b390c2.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/pages/link-990485957f128708c04b.module.js"
+      src="/_next/static/pages/link-4c38d18e319a774ec055.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 14.3s 14.4s ⚠️ +124ms
nodeModulesSize 66 MB 66 MB -2.47 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.59 kB 6.59 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..769f.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.2 kB 57.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.68 kB 5.68 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.09 kB 7.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.7 kB 52.7 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 540 B 540 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 876 kB 876 kB
link.js 915 kB 914 kB -1.15 kB
routerDirect.js 907 kB 907 kB
withRouter.js 907 kB 907 kB
Overall change 4.49 MB 4.49 MB -1.15 kB
Commit: fc07361

Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

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

This is awesome.

@ijjk
Copy link
Member

ijjk commented Jul 2, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 11s 11.7s ⚠️ +700ms
nodeModulesSize 66 MB 66 MB -2.47 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Janpot/next.js convert-link Change
/ failed reqs 0 0
/ total time (seconds) 1.804 2.057 ⚠️ +0.25
/ avg req/sec 1386.13 1215.63 ⚠️ -170.5
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.209 1.258 ⚠️ +0.05
/error-in-render avg req/sec 2068.03 1987.37 ⚠️ -80.66
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.59 kB 6.59 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..b4c5.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.2 kB 57.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.68 kB 5.68 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.09 kB 7.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.7 kB 52.7 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 540 B 540 B
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
index.html gzip 952 B 952 B
link.html gzip 958 B 957 B -1 B
withRouter.html gzip 945 B 945 B
Overall change 2.85 kB 2.85 kB -1 B

Diffs

Diff for _buildManifest.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-f35cd1774d910f5523ed.js"],
   "/_error": ["static\u002Fpages\u002F_error-f39e6723c6acde17325a.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-9e216cd51bf04b309e08.js"],
-  "/link": ["static\u002Fpages\u002Flink-812a420dce76d6a59580.js"],
+  "/link": ["static\u002Fpages\u002Flink-4ce0c7178d36c3b390c2.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-b95d3f54c75949a43da6.js"
   ],
Diff for _buildManifest.module.js
@@ -2,7 +2,7 @@ self.__BUILD_MANIFEST = {
   "/": ["static\u002Fpages\u002Findex-da343bca3b67f1bcf42d.module.js"],
   "/_error": ["static\u002Fpages\u002F_error-b3c4c3f8dbb1417657e6.module.js"],
   "/hooks": ["static\u002Fpages\u002Fhooks-dc8f274035a2839a1e61.module.js"],
-  "/link": ["static\u002Fpages\u002Flink-990485957f128708c04b.module.js"],
+  "/link": ["static\u002Fpages\u002Flink-4c38d18e319a774ec055.module.js"],
   "/routerDirect": [
     "static\u002Fpages\u002FrouterDirect-c62f258dff7fece0a732.module.js"
   ],
Diff for link.html
@@ -36,7 +36,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/pages/link-990485957f128708c04b.module.js"
+      href="/_next/static/pages/link-4c38d18e319a774ec055.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -146,13 +146,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/pages/link-812a420dce76d6a59580.js"
+      src="/_next/static/pages/link-4ce0c7178d36c3b390c2.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/pages/link-990485957f128708c04b.module.js"
+      src="/_next/static/pages/link-4c38d18e319a774ec055.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
buildDuration 12.5s 12.8s ⚠️ +319ms
nodeModulesSize 66 MB 66 MB -2.47 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.js gzip 6.59 kB 6.59 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..b4c5.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.2 kB 57.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Janpot/next.js convert-link Change
main-HASH.module.js gzip 5.68 kB 5.68 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.09 kB 7.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.7 kB 52.7 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Janpot/next.js convert-link Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Janpot/next.js convert-link Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 540 B 540 B
Serverless bundles Overall decrease ✓
vercel/next.js canary Janpot/next.js convert-link Change
_error.js 876 kB 876 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 876 kB 876 kB
link.js 916 kB 914 kB -1.15 kB
routerDirect.js 908 kB 908 kB
withRouter.js 908 kB 908 kB
Overall change 4.49 MB 4.49 MB -1.15 kB
Commit: 005ed7f

@kodiakhq kodiakhq bot merged commit dd97c98 into vercel:canary Jul 2, 2020
@Janpot Janpot deleted the convert-link branch July 2, 2020 06:39
rokinsky pushed a commit to rokinsky/next.js that referenced this pull request Jul 11, 2020
Add tests and fix for when the url contains query parameters.
`router` now uses the same method for formatting url+as pair as `Link`, will be able to share code after vercel#14633 is merged
rokinsky pushed a commit to rokinsky/next.js that referenced this pull request Jul 11, 2020
Convert `Link` to a function component. Prefetch logic and memoized url formatting now meshes nicely with React hooks. Class methods were hoisted to module scope to preserve performance characteristics.
@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 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.

3 participants