-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Remove preload for priority images #19118
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall decrease ✓
Page Load Tests Overall decrease
|
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.406 | 2.371 | -0.04 |
/ avg req/sec | 1039.19 | 1054.39 | +15.2 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.262 | 1.305 | |
/error-in-render avg req/sec | 1980.24 | 1916.25 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
677f882d2ed8..d9fb.js gzip | 12.7 kB | 12.7 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-43dd9e5..8439.js gzip | 6.48 kB | 6.48 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.9 kB | 58.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 8.23 kB | 8.23 kB | ✓ |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-472f7d5..dule.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53.5 kB | 53.5 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_app-3b0cf13..85f8.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-6f635..c393.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-d4ffc3..9e0f.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-d9a15a0..130a.js gzip | 1.57 kB | 1.57 kB | ✓ |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.98 kB | 7.98 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-f2fcc..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-973cce3..dule.js gzip | 1.51 kB | 1.51 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.6 kB | 5.6 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
_buildManife..dule.js gzip | 330 B | 330 B | ✓ |
Overall change | 651 B | 651 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
index.html gzip | 972 B | 972 B | ✓ |
link.html gzip | 977 B | 977 B | ✓ |
withRouter.html gzip | 964 B | 964 B | ✓ |
Overall change | 2.91 kB | 2.91 kB | ✓ |
Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
buildDuration | 14.1s | 14.5s | |
nodeModulesSize | 84.9 MB | 84.9 MB | -3.42 kB |
Client Bundles (main, webpack, commons)
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
677f882d2ed8..d9fb.js gzip | 12.7 kB | 12.7 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-43dd9e5..8439.js gzip | 6.48 kB | 6.48 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.9 kB | 58.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 8.23 kB | 8.23 kB | ✓ |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-472f7d5..dule.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53.5 kB | 53.5 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_app-3b0cf13..85f8.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-6f635..c393.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-d4ffc3..9e0f.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-d9a15a0..130a.js gzip | 1.57 kB | 1.57 kB | ✓ |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.98 kB | 7.98 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-f2fcc..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-973cce3..dule.js gzip | 1.51 kB | 1.51 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.6 kB | 5.6 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
_buildManife..dule.js gzip | 330 B | 330 B | ✓ |
Overall change | 651 B | 651 B | ✓ |
Serverless bundles
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_error.js | 916 kB | 916 kB | ✓ |
404.html | 4.61 kB | 4.61 kB | ✓ |
hooks.html | 3.86 kB | 3.86 kB | ✓ |
index.js | 916 kB | 916 kB | ✓ |
link.js | 974 kB | 974 kB | ✓ |
routerDirect.js | 967 kB | 967 kB | ✓ |
withRouter.js | 967 kB | 967 kB | ✓ |
Overall change | 4.75 MB | 4.75 MB | ✓ |
This comment has been minimized.
This comment has been minimized.
ijjk
previously approved these changes
Nov 12, 2020
styfle
approved these changes
Nov 12, 2020
ijjk
approved these changes
Nov 12, 2020
Stats from current PRDefault Server Mode (Increase detected
|
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
buildDuration | 13.8s | 13.1s | -656ms |
nodeModulesSize | 84.9 MB | 84.9 MB | -3.42 kB |
Page Load Tests Overall increase ✓
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.485 | 2.394 | -0.09 |
/ avg req/sec | 1006.04 | 1044.24 | +38.2 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.323 | 1.314 | -0.01 |
/error-in-render avg req/sec | 1890.35 | 1902.47 | +12.12 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
677f882d2ed8..d9fb.js gzip | 12.7 kB | 12.7 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-43dd9e5..8439.js gzip | 6.48 kB | 6.48 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.9 kB | 58.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 8.23 kB | 8.23 kB | ✓ |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-472f7d5..dule.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53.5 kB | 53.5 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_app-3b0cf13..85f8.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-6f635..c393.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-d4ffc3..9e0f.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-d9a15a0..130a.js gzip | 1.57 kB | 1.57 kB | ✓ |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.98 kB | 7.98 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-f2fcc..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-973cce3..dule.js gzip | 1.51 kB | 1.51 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.6 kB | 5.6 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
_buildManife..dule.js gzip | 330 B | 330 B | ✓ |
Overall change | 651 B | 651 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
index.html gzip | 972 B | 972 B | ✓ |
link.html gzip | 977 B | 977 B | ✓ |
withRouter.html gzip | 964 B | 964 B | ✓ |
Overall change | 2.91 kB | 2.91 kB | ✓ |
Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
buildDuration | 15.3s | 15.1s | -191ms |
nodeModulesSize | 84.9 MB | 84.9 MB | -3.42 kB |
Client Bundles (main, webpack, commons)
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
677f882d2ed8..d9fb.js gzip | 12.7 kB | 12.7 kB | ✓ |
framework.HASH.js gzip | 39 kB | 39 kB | ✓ |
main-43dd9e5..8439.js gzip | 6.48 kB | 6.48 kB | ✓ |
webpack-e067..f178.js gzip | 751 B | 751 B | ✓ |
Overall change | 58.9 kB | 58.9 kB | ✓ |
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
677f882d2ed8..dule.js gzip | 8.23 kB | 8.23 kB | ✓ |
framework.HA..dule.js gzip | 39 kB | 39 kB | ✓ |
main-472f7d5..dule.js gzip | 5.58 kB | 5.58 kB | ✓ |
webpack-07c5..dule.js gzip | 751 B | 751 B | ✓ |
Overall change | 53.5 kB | 53.5 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
polyfills-4b..e242.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_app-3b0cf13..85f8.js gzip | 1.28 kB | 1.28 kB | ✓ |
_error-6f635..c393.js gzip | 3.44 kB | 3.44 kB | ✓ |
hooks-d4ffc3..9e0f.js gzip | 887 B | 887 B | ✓ |
index-17468f..5d83.js gzip | 227 B | 227 B | ✓ |
link-d9a15a0..130a.js gzip | 1.57 kB | 1.57 kB | ✓ |
routerDirect..924c.js gzip | 284 B | 284 B | ✓ |
withRouter-7..c13d.js gzip | 284 B | 284 B | ✓ |
Overall change | 7.98 kB | 7.98 kB | ✓ |
Client Pages Modern
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_app-75d3a82..dule.js gzip | 625 B | 625 B | ✓ |
_error-f2fcc..dule.js gzip | 2.29 kB | 2.29 kB | ✓ |
hooks-cbf13f..dule.js gzip | 387 B | 387 B | ✓ |
index-b9a643..dule.js gzip | 226 B | 226 B | ✓ |
link-973cce3..dule.js gzip | 1.51 kB | 1.51 kB | ✓ |
routerDirect..dule.js gzip | 284 B | 284 B | ✓ |
withRouter-f..dule.js gzip | 282 B | 282 B | ✓ |
Overall change | 5.6 kB | 5.6 kB | ✓ |
Client Build Manifests
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_buildManifest.js gzip | 321 B | 321 B | ✓ |
_buildManife..dule.js gzip | 330 B | 330 B | ✓ |
Overall change | 651 B | 651 B | ✓ |
Serverless bundles
vercel/next.js canary | Timer/next.js hotfix/drop-preload | Change | |
---|---|---|---|
_error.js | 916 kB | 916 kB | ✓ |
404.html | 4.61 kB | 4.61 kB | ✓ |
hooks.html | 3.86 kB | 3.86 kB | ✓ |
index.js | 916 kB | 916 kB | ✓ |
link.js | 974 kB | 974 kB | ✓ |
routerDirect.js | 967 kB | 967 kB | ✓ |
withRouter.js | 967 kB | 967 kB | ✓ |
Overall change | 4.75 MB | 4.75 MB | ✓ |
This was referenced Dec 25, 2020
kodiakhq bot
pushed a commit
that referenced
this pull request
Dec 30, 2020
The HTML Living Standard explicitly says `href` should be omitted to prevent the loading of an incorrectly sized image: https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset ![image](https://user-images.githubusercontent.com/616428/103378205-8a013800-4aaf-11eb-9085-10f547263fed.png) Since it's in the spec, I assume this is valid-enough HTML. This also dedupes preloads which the old implementation did not. --- Fixes #18756 x-ref #19118 Fixes #18720
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #18720
This removes image preloading. It doesn't work correctly on any browser other than Chrome (with Chrome's real engine). On all other browsers, it triggers 2x the bytes to be downloaded. The tradeoff isn't worth it here IMO.
Chrome itself should be smart enough to bump an
<img />
tag's priority over other preloads that are script type during the preparse phase.We can reintroduce this when we don't hurt non-Chrome users.