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

More explicit typing for IncrementalCache API #26941

Merged
merged 6 commits into from
Jul 6, 2021

Conversation

devknoll
Copy link
Contributor

@devknoll devknoll commented Jul 6, 2021

Make the typing for IncrementalCache more explicit. With streaming, we’ll want to stream page data as well as HTML. This is a bit complicated now because we’re overloading pageData for both redirects and pages.

This PR makes the different types explicit. With streaming, the data for redirects is synchronously available, while the data for pages will become a stream.

A follow up PR will add a “stream through” cache in front of IncrementalCache

@ijjk ijjk added created-by: Chrome Aurora PRs by the Google Chrome team: https://web.dev/aurora type: next labels Jul 6, 2021
@ijjk

This comment has been minimized.

@devknoll devknoll marked this pull request as ready for review July 6, 2021 04:07
timneutkens
timneutkens previously approved these changes Jul 6, 2021
aarsxx
aarsxx previously approved these changes Jul 6, 2021
@devknoll devknoll dismissed stale reviews from aarsxx and timneutkens via 23c3236 July 6, 2021 15:14
@ijjk
Copy link
Member

ijjk commented Jul 6, 2021

Stats from current PR

Default Build (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache Change
buildDuration 13.9s 14s ⚠️ +163ms
buildDurationCached 3.4s 3.3s -74ms
nodeModulesSize 49.3 MB 49.3 MB ⚠️ +1.67 kB
Page Load Tests Overall increase ✓
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache Change
/ failed reqs 0 0
/ total time (seconds) 2.474 2.453 -0.02
/ avg req/sec 1010.61 1019.13 +8.52
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.391 1.375 -0.02
/error-in-render avg req/sec 1797.75 1818.34 +20.59
Client Bundles (main, webpack, commons)
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache Change
359.HASH.js gzip 3.09 kB 3.09 kB
framework-HASH.js gzip 42 kB 42 kB
main-HASH.js gzip 20.6 kB 20.6 kB
webpack-HASH.js gzip 1.49 kB 1.49 kB
Overall change 67.2 kB 67.2 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache 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 azukaru/next.js x-clean-up-incremental-cache Change
_app-HASH.js gzip 803 B 803 B
_error-HASH.js gzip 3.18 kB 3.18 kB
amp-HASH.js gzip 526 B 526 B
css-HASH.js gzip 329 B 329 B
hooks-HASH.js gzip 903 B 903 B
index-HASH.js gzip 263 B 263 B
link-HASH.js gzip 1.65 kB 1.65 kB
routerDirect..HASH.js gzip 322 B 322 B
withRouter-HASH.js gzip 320 B 320 B
bb14e60e810b..30f.css gzip 125 B 125 B
Overall change 8.42 kB 8.42 kB
Client Build Manifests
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache Change
_buildManifest.js gzip 390 B 390 B
Overall change 390 B 390 B
Rendered Page Sizes
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache Change
index.html gzip 523 B 523 B
link.html gzip 537 B 537 B
withRouter.html gzip 515 B 515 B
Overall change 1.57 kB 1.57 kB

Webpack 4 Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache Change
buildDuration 12.3s 12.5s ⚠️ +175ms
buildDurationCached 5s 4.8s -161ms
nodeModulesSize 49.3 MB 49.3 MB ⚠️ +1.67 kB
Page Load Tests Overall increase ✓
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache Change
/ failed reqs 0 0
/ total time (seconds) 2.455 2.461 ⚠️ +0.01
/ avg req/sec 1018.38 1015.89 ⚠️ -2.49
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.404 1.364 -0.04
/error-in-render avg req/sec 1780 1833.24 +53.24
Client Bundles (main, webpack, commons)
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache Change
14.HASH.js gzip 3.11 kB 3.11 kB
677f882d2ed8..HASH.js gzip 13.9 kB 13.9 kB
framework.HASH.js gzip 41.8 kB 41.8 kB
main-HASH.js gzip 7.81 kB 7.81 kB
webpack-HASH.js gzip 1.19 kB 1.19 kB
Overall change 67.8 kB 67.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache 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 azukaru/next.js x-clean-up-incremental-cache Change
_app-HASH.js gzip 791 B 791 B
_error-HASH.js gzip 3.83 kB 3.83 kB
amp-HASH.js gzip 531 B 531 B
css-HASH.js gzip 333 B 333 B
hooks-HASH.js gzip 910 B 910 B
index-HASH.js gzip 227 B 227 B
link-HASH.js gzip 1.64 kB 1.64 kB
routerDirect..HASH.js gzip 295 B 295 B
withRouter-HASH.js gzip 292 B 292 B
e025d2764813..52f.css gzip 125 B 125 B
Overall change 8.98 kB 8.98 kB
Client Build Manifests
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache Change
_buildManifest.js gzip 418 B 418 B
Overall change 418 B 418 B
Rendered Page Sizes
vercel/next.js canary azukaru/next.js x-clean-up-incremental-cache Change
index.html gzip 569 B 569 B
link.html gzip 581 B 581 B
withRouter.html gzip 561 B 561 B
Overall change 1.71 kB 1.71 kB
Commit: 23c3236

@kodiakhq kodiakhq bot merged commit 53123ad into vercel:canary Jul 6, 2021
flybayer pushed a commit to blitz-js/next.js that referenced this pull request Aug 19, 2021
Make the typing for `IncrementalCache` more explicit. With streaming, we’ll want to stream page data as well as HTML. This is a bit complicated now because we’re overloading `pageData` for both redirects and pages.

This PR makes the different types explicit. With streaming, the data for redirects is synchronously available, while the data for pages will become a stream.

A follow up PR will add a “stream through” cache in front of `IncrementalCache`
@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.
Labels
created-by: Chrome Aurora PRs by the Google Chrome team: https://web.dev/aurora type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants