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

Run server client/server builds serially #23371

Merged
merged 4 commits into from
Mar 24, 2021

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Mar 24, 2021

Previously we special cased serverless builds and ran the client/server builds serially to allow the server build to load manifests produced in the client. To help with memory usage and for consistency this updates server mode to build in the same way.

Bug

  • Related issues linked using fixes #number
  • Integration tests added

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.

Documentation / Examples

  • Make sure the linting passes

packages/next/build/index.ts Outdated Show resolved Hide resolved
@ijjk
Copy link
Member Author

ijjk commented Mar 24, 2021

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js update/server-client-build Change
buildDuration 15s 15.4s ⚠️ +311ms
nodeModulesSize 61.7 MB 61.7 MB ⚠️ +801 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary ijjk/next.js update/server-client-build Change
/ failed reqs 0 0
/ total time (seconds) 2.001 2.011 ⚠️ +0.01
/ avg req/sec 1249.23 1243.37 ⚠️ -5.86
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.2 1.253 ⚠️ +0.05
/error-in-render avg req/sec 2083.61 1995.09 ⚠️ -88.52
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js update/server-client-build Change
597-ec2335c0..e105.js gzip 13.3 kB 13.3 kB
778-95c4fcdf..36e9.js gzip 7.06 kB 7.06 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js update/server-client-build 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 ijjk/next.js update/server-client-build Change
_app-bdbd9e6..6cfe.js gzip 1.3 kB 1.3 kB
_error-b58c1..9b8e.js gzip 3.4 kB 3.4 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-d124373..c521.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 8.76 kB 8.76 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js update/server-client-build Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js update/server-client-build Change
index.html gzip 609 B 609 B
link.html gzip 615 B 615 B
withRouter.html gzip 604 B 604 B
Overall change 1.83 kB 1.83 kB

Serverless Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js update/server-client-build Change
buildDuration 18.5s 18.6s ⚠️ +101ms
nodeModulesSize 61.7 MB 61.7 MB ⚠️ +801 B
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js update/server-client-build Change
597-ec2335c0..e105.js gzip 13.3 kB 13.3 kB
778-95c4fcdf..36e9.js gzip 7.06 kB 7.06 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js update/server-client-build 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 ijjk/next.js update/server-client-build Change
_app-bdbd9e6..6cfe.js gzip 1.3 kB 1.3 kB
_error-b58c1..9b8e.js gzip 3.4 kB 3.4 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-d124373..c521.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 8.76 kB 8.76 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js update/server-client-build Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Serverless bundles Overall decrease ✓
vercel/next.js canary ijjk/next.js update/server-client-build Change
_error.js 1.34 MB 1.34 MB -2 B
404.html 2.76 kB 2.76 kB
500.html 2.75 kB 2.75 kB
amp.amp.html 10.6 kB 10.6 kB
amp.html 1.96 kB 1.96 kB
hooks.html 2.01 kB 2.01 kB
index.js 1.34 MB 1.34 MB
link.js 1.4 MB 1.4 MB
routerDirect.js 1.39 MB 1.39 MB
withRouter.js 1.39 MB 1.39 MB
Overall change 6.89 MB 6.89 MB -2 B

Webpack 5 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js update/server-client-build Change
buildDuration 15.2s 15s -252ms
nodeModulesSize 61.7 MB 61.7 MB ⚠️ +801 B
Page Load Tests Overall increase ✓
vercel/next.js canary ijjk/next.js update/server-client-build Change
/ failed reqs 0 0
/ total time (seconds) 1.958 2.004 ⚠️ +0.05
/ avg req/sec 1277.03 1247.63 ⚠️ -29.4
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.279 1.242 -0.04
/error-in-render avg req/sec 1954.89 2012.78 +57.89
Client Bundles (main, webpack, commons)
vercel/next.js canary ijjk/next.js update/server-client-build Change
597-ec2335c0..e105.js gzip 13.3 kB 13.3 kB
778-95c4fcdf..36e9.js gzip 7.06 kB 7.06 kB
framework.HASH.js gzip 39.3 kB 39.3 kB
main-HASH.js gzip 151 B 151 B
webpack-HASH.js gzip 993 B 993 B
Overall change 60.8 kB 60.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js update/server-client-build 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 ijjk/next.js update/server-client-build Change
_app-bdbd9e6..6cfe.js gzip 1.3 kB 1.3 kB
_error-b58c1..9b8e.js gzip 3.4 kB 3.4 kB
amp-89a5460c..567f.js gzip 558 B 558 B
hooks-8c2e74..be37.js gzip 924 B 924 B
index-fec729..83b2.js gzip 243 B 243 B
link-d124373..c521.js gzip 1.66 kB 1.66 kB
routerDirect..5759.js gzip 336 B 336 B
withRouter-1..98bf.js gzip 334 B 334 B
Overall change 8.76 kB 8.76 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js update/server-client-build Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Rendered Page Sizes
vercel/next.js canary ijjk/next.js update/server-client-build Change
index.html gzip 609 B 609 B
link.html gzip 615 B 615 B
withRouter.html gzip 604 B 604 B
Overall change 1.83 kB 1.83 kB

Diffs

Diff for index.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/",
         "query": {},
-        "buildId": "T6pRggwvj4dlMFUwfWeNY",
+        "buildId": "ObNQaZ1vuwHrQ2XxpGSIE",
         "isFallback": false,
         "gip": true
       }
@@ -86,11 +86,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/T6pRggwvj4dlMFUwfWeNY/_buildManifest.js"
+      src="/_next/static/ObNQaZ1vuwHrQ2XxpGSIE/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/T6pRggwvj4dlMFUwfWeNY/_ssgManifest.js"
+      src="/_next/static/ObNQaZ1vuwHrQ2XxpGSIE/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for link.html
@@ -53,7 +53,7 @@
         "props": { "pageProps": {} },
         "page": "/link",
         "query": {},
-        "buildId": "T6pRggwvj4dlMFUwfWeNY",
+        "buildId": "ObNQaZ1vuwHrQ2XxpGSIE",
         "isFallback": false,
         "gip": true
       }
@@ -91,11 +91,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/T6pRggwvj4dlMFUwfWeNY/_buildManifest.js"
+      src="/_next/static/ObNQaZ1vuwHrQ2XxpGSIE/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/T6pRggwvj4dlMFUwfWeNY/_ssgManifest.js"
+      src="/_next/static/ObNQaZ1vuwHrQ2XxpGSIE/_ssgManifest.js"
       async=""
     ></script>
   </body>
Diff for withRouter.html
@@ -48,7 +48,7 @@
         "props": { "pageProps": {} },
         "page": "/withRouter",
         "query": {},
-        "buildId": "T6pRggwvj4dlMFUwfWeNY",
+        "buildId": "ObNQaZ1vuwHrQ2XxpGSIE",
         "isFallback": false,
         "gip": true
       }
@@ -86,11 +86,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/T6pRggwvj4dlMFUwfWeNY/_buildManifest.js"
+      src="/_next/static/ObNQaZ1vuwHrQ2XxpGSIE/_buildManifest.js"
       async=""
     ></script>
     <script
-      src="/_next/static/T6pRggwvj4dlMFUwfWeNY/_ssgManifest.js"
+      src="/_next/static/ObNQaZ1vuwHrQ2XxpGSIE/_ssgManifest.js"
       async=""
     ></script>
   </body>
Commit: 7a88154

@kodiakhq kodiakhq bot merged commit a6c0d76 into vercel:canary Mar 24, 2021
@ijjk ijjk deleted the update/server-client-build branch March 24, 2021 20:50
SokratisVidros pushed a commit to SokratisVidros/next.js that referenced this pull request Apr 20, 2021
Previously we special cased serverless builds and ran the client/server builds serially to allow the server build to load manifests produced in the client. To help with memory usage and for consistency this updates server mode to build in the same way.  

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes
flybayer pushed a commit to blitz-js/next.js that referenced this pull request Apr 29, 2021
Previously we special cased serverless builds and ran the client/server builds serially to allow the server build to load manifests produced in the client. To help with memory usage and for consistency this updates server mode to build in the same way.  

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes
@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 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.

2 participants