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

[Fizz][Float] stop preloading stylesheets that are not stylesheet resources #26873

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

gnoff
Copy link
Collaborator

@gnoff gnoff commented May 30, 2023

We previously preloaded stylesheets that were rendered in Fizz. The idea was we'd get a headstart fetching these resources since we know they are going to be rendered. However to really be effective non-float stylesheets need to rendered in the head and the preload here is not helpful and potentially hurtful to perf in a minor way. This change removes this functionality to make the code smaller and simpler

@react-sizebot
Copy link

react-sizebot commented May 30, 2023

Comparing: 042d8f6...943ff43

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 164.37 kB 164.37 kB = 51.79 kB 51.79 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 171.81 kB 171.81 kB = 54.03 kB 54.03 kB
facebook-www/ReactDOM-prod.classic.js = 570.67 kB 570.67 kB = 100.68 kB 100.68 kB
facebook-www/ReactDOM-prod.modern.js = 554.41 kB 554.41 kB = 97.85 kB 97.85 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
facebook-www/ReactDOMServer-prod.modern.js +0.58% 136.47 kB 137.26 kB = 25.42 kB 25.40 kB
facebook-www/ReactDOMServer-prod.classic.js +0.57% 139.99 kB 140.78 kB = 26.09 kB 26.07 kB
facebook-www/ReactDOMServerStreaming-prod.modern.js +0.55% 142.37 kB 143.15 kB = 26.99 kB 26.95 kB
facebook-www/ReactDOMServer-dev.classic.js = 381.81 kB 380.64 kB = 82.72 kB 82.59 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.development.js = 374.73 kB 373.57 kB = 82.64 kB 82.50 kB
oss-experimental/react-dom/cjs/react-dom-server.node.development.js = 373.56 kB 372.40 kB = 82.30 kB 82.15 kB
oss-experimental/react-dom/cjs/react-dom-static.node.development.js = 373.53 kB 372.36 kB = 82.40 kB 82.24 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.development.js = 372.91 kB 371.75 kB = 82.19 kB 82.04 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.development.js = 372.48 kB 371.31 kB = 82.37 kB 82.21 kB
facebook-www/ReactDOMServer-dev.modern.js = 374.38 kB 373.21 kB = 81.08 kB 80.95 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.development.js = 372.07 kB 370.90 kB = 82.25 kB 82.10 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.development.js = 371.78 kB 370.62 kB = 82.19 kB 82.03 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.development.js = 371.37 kB 370.21 kB = 82.07 kB 81.92 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.development.js = 369.89 kB 368.73 kB = 81.59 kB 81.43 kB
oss-experimental/react-dom/umd/react-dom-server-legacy.browser.development.js = 390.58 kB 389.35 kB = 83.06 kB 82.92 kB
oss-experimental/react-dom/umd/react-dom-server.browser.development.js = 389.71 kB 388.48 kB = 83.17 kB 83.02 kB
facebook-www/ReactDOMServerStreaming-dev.modern.js = 369.21 kB 368.04 kB = 79.81 kB 79.69 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.development.js = 364.97 kB 363.81 kB = 80.48 kB 80.09 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.development.js = 364.95 kB 363.78 kB = 80.45 kB 80.06 kB
oss-stable/react-dom/cjs/react-dom-server.node.development.js = 364.39 kB 363.22 kB = 80.35 kB 79.98 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.development.js = 364.36 kB 363.20 kB = 80.32 kB 79.95 kB
oss-stable/react-dom/cjs/react-dom-server.edge.development.js = 363.30 kB 362.14 kB = 80.42 kB 80.05 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.development.js = 363.27 kB 362.11 kB = 80.39 kB 80.02 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.development.js = 363.16 kB 361.99 kB = 80.01 kB 79.63 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.development.js = 363.13 kB 361.97 kB = 79.99 kB 79.60 kB
oss-stable/react-dom/cjs/react-dom-server.browser.development.js = 362.89 kB 361.73 kB = 80.30 kB 79.93 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.development.js = 362.86 kB 361.70 kB = 80.28 kB 79.90 kB
oss-stable/react-dom/cjs/react-dom-server.bun.development.js = 360.13 kB 358.97 kB = 79.41 kB 79.04 kB
oss-stable-semver/react-dom/cjs/react-dom-server.bun.development.js = 360.11 kB 358.94 kB = 79.39 kB 79.01 kB
oss-stable/react-dom/umd/react-dom-server-legacy.browser.development.js = 380.40 kB 379.17 kB = 80.92 kB 80.78 kB
oss-stable-semver/react-dom/umd/react-dom-server-legacy.browser.development.js = 380.38 kB 379.15 kB = 80.90 kB 80.75 kB
oss-stable/react-dom/umd/react-dom-server.browser.development.js = 380.12 kB 378.89 kB = 81.24 kB 81.10 kB
oss-stable-semver/react-dom/umd/react-dom-server.browser.development.js = 380.09 kB 378.86 kB = 81.22 kB 81.08 kB
oss-stable/react-dom/cjs/react-dom-server.node.production.min.js = 65.19 kB 64.74 kB = 20.03 kB 20.01 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.production.min.js = 65.16 kB 64.72 kB = 20.00 kB 19.99 kB
oss-experimental/react-dom/cjs/react-dom-server.node.production.min.js = 67.27 kB 66.81 kB = 20.99 kB 20.93 kB
oss-stable/react-dom/cjs/react-dom-server.edge.production.min.js = 65.06 kB 64.62 kB = 20.00 kB 19.98 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.production.min.js = 65.03 kB 64.59 kB = 19.97 kB 19.95 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.production.min.js = 67.15 kB 66.69 kB = 20.95 kB 20.89 kB
oss-experimental/react-dom/cjs/react-dom-static.node.production.min.js = 67.25 kB 66.79 kB = 21.00 kB 20.93 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.production.min.js = 65.86 kB 65.39 kB = 20.17 kB 20.12 kB
oss-stable/react-dom/cjs/react-dom-server.bun.production.min.js = 63.24 kB 62.78 kB = 19.01 kB 18.98 kB
oss-stable-semver/react-dom/cjs/react-dom-server.bun.production.min.js = 63.21 kB 62.76 kB = 18.98 kB 18.96 kB
oss-experimental/react-dom/umd/react-dom-server.browser.production.min.js = 62.95 kB 62.50 kB = 19.69 kB 19.66 kB
oss-stable/react-dom/umd/react-dom-server.browser.production.min.js = 60.98 kB 60.53 kB +0.10% 18.79 kB 18.81 kB
oss-stable-semver/react-dom/umd/react-dom-server.browser.production.min.js = 60.95 kB 60.51 kB +0.11% 18.76 kB 18.78 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.production.min.js = 63.01 kB 62.55 kB = 19.52 kB 19.47 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.production.min.js = 62.80 kB 62.34 kB = 19.44 kB 19.42 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.production.min.js = 62.68 kB 62.22 kB = 19.39 kB 19.37 kB
oss-stable/react-dom/cjs/react-dom-server.browser.production.min.js = 60.82 kB 60.37 kB = 18.58 kB 18.55 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.production.min.js = 66.51 kB 66.02 kB = 20.10 kB 20.05 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.production.min.js = 60.79 kB 60.34 kB = 18.55 kB 18.53 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.production.min.js = 63.90 kB 63.42 kB = 18.95 kB 18.90 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.production.min.js = 63.87 kB 63.39 kB = 18.93 kB 18.87 kB
oss-experimental/react-dom/umd/react-dom-server-legacy.browser.production.min.js = 61.78 kB 61.30 kB = 18.81 kB 18.76 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.production.min.js = 61.62 kB 61.13 kB = 18.52 kB 18.45 kB
oss-stable/react-dom/umd/react-dom-server-legacy.browser.production.min.js = 59.28 kB 58.81 kB = 17.62 kB 17.61 kB
oss-stable-semver/react-dom/umd/react-dom-server-legacy.browser.production.min.js = 59.26 kB 58.78 kB = 17.60 kB 17.59 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.production.min.js = 59.12 kB 58.64 kB = 17.38 kB 17.34 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.production.min.js = 59.09 kB 58.61 kB = 17.36 kB 17.31 kB

Generated by 🚫 dangerJS against 943ff43

…dea was we'd get a headstart fetching these resources since we know they are going to be rendered. However to really be effective non-float stylesheets need to rendered in the head and the preload here is not helpful and potentially hurtful to perf in a minor way. This change removes this functionality to make the code smaller and simpler
@gnoff gnoff merged commit 5fb2c15 into facebook:main Jun 1, 2023
@gnoff gnoff deleted the no-stylesheet-preload branch June 1, 2023 20:23
github-actions bot pushed a commit that referenced this pull request Jun 1, 2023
…ources (#26873)

We previously preloaded stylesheets that were rendered in Fizz. The idea
was we'd get a headstart fetching these resources since we know they are
going to be rendered. However to really be effective non-float
stylesheets need to rendered in the head and the preload here is not
helpful and potentially hurtful to perf in a minor way. This change
removes this functionality to make the code smaller and simpler

DiffTrain build for [5fb2c15](5fb2c15)
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
…ources (facebook#26873)

We previously preloaded stylesheets that were rendered in Fizz. The idea
was we'd get a headstart fetching these resources since we know they are
going to be rendered. However to really be effective non-float
stylesheets need to rendered in the head and the preload here is not
helpful and potentially hurtful to perf in a minor way. This change
removes this functionality to make the code smaller and simpler
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
…ources (#26873)

We previously preloaded stylesheets that were rendered in Fizz. The idea
was we'd get a headstart fetching these resources since we know they are
going to be rendered. However to really be effective non-float
stylesheets need to rendered in the head and the preload here is not
helpful and potentially hurtful to perf in a minor way. This change
removes this functionality to make the code smaller and simpler

DiffTrain build for commit 5fb2c15.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants