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] preload bootstrapModules #26754

Merged
merged 1 commit into from
May 31, 2023
Merged

Conversation

gnoff
Copy link
Collaborator

@gnoff gnoff commented May 1, 2023

stacked on #26753

Adds support for preloading bootstrapModules. We don't yet support modules in Float's public interface but this implementation should be compatible with what we do when we add it.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels May 1, 2023
@@ -4817,7 +4826,7 @@ export type Resources = {
// usedImagePreloads: Set<PreloadResource>,
precedences: Map<string, Set<StyleResource>>,
stylePrecedences: Map<string, StyleTagResource>,
usedStylesheets: Set<PreloadResource>,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We recomputed the key before using props however with variance on props shape this was going to be even more expensive. Turns out we could just store the key with the resource by making this change which I should have done all along

@gnoff gnoff changed the title Preload bootstrap modules [Fizz] preload bootstrapModules May 1, 2023
@gnoff gnoff requested a review from sebmarkbage May 1, 2023 20:48
@react-sizebot
Copy link

react-sizebot commented May 1, 2023

Comparing: b864ad4...72b5f91

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.28 kB 164.28 kB = 51.79 kB 51.79 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 171.72 kB 171.72 kB = 54.03 kB 54.03 kB
facebook-www/ReactDOM-prod.classic.js = 570.52 kB 570.52 kB = 100.66 kB 100.66 kB
facebook-www/ReactDOM-prod.modern.js = 554.26 kB 554.26 kB = 97.84 kB 97.84 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/react-dom/cjs/react-dom-server.bun.development.js +0.34% 358.78 kB 359.98 kB +0.06% 79.32 kB 79.37 kB
oss-stable/react-dom/cjs/react-dom-server.bun.development.js +0.34% 358.80 kB 360.01 kB +0.06% 79.35 kB 79.40 kB
facebook-www/ReactDOMServerStreaming-dev.modern.js +0.33% 367.86 kB 369.08 kB +0.07% 79.74 kB 79.79 kB
oss-stable-semver/react-dom/umd/react-dom-server.browser.development.js +0.33% 378.70 kB 379.96 kB +0.07% 81.14 kB 81.20 kB
oss-stable/react-dom/umd/react-dom-server.browser.development.js +0.33% 378.73 kB 379.99 kB +0.07% 81.17 kB 81.22 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.development.js +0.33% 361.53 kB 362.74 kB +0.05% 80.21 kB 80.26 kB
oss-stable-semver/react-dom/umd/react-dom-server-legacy.browser.development.js +0.33% 378.98 kB 380.25 kB +0.07% 80.83 kB 80.88 kB
oss-stable/react-dom/cjs/react-dom-server.browser.development.js +0.33% 361.56 kB 362.76 kB +0.06% 80.24 kB 80.28 kB
oss-stable/react-dom/umd/react-dom-server-legacy.browser.development.js +0.33% 379.01 kB 380.27 kB +0.07% 80.85 kB 80.91 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.development.js +0.33% 361.80 kB 363.00 kB +0.07% 79.92 kB 79.97 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.development.js +0.33% 361.83 kB 363.03 kB +0.07% 79.94 kB 80.00 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.development.js +0.33% 361.94 kB 363.15 kB +0.06% 80.33 kB 80.38 kB
oss-stable/react-dom/cjs/react-dom-server.edge.development.js +0.33% 361.97 kB 363.17 kB +0.06% 80.36 kB 80.41 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.development.js +0.33% 363.03 kB 364.24 kB +0.05% 80.26 kB 80.31 kB
oss-stable/react-dom/cjs/react-dom-server.node.development.js +0.33% 363.06 kB 364.26 kB +0.05% 80.29 kB 80.33 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.development.js +0.33% 363.62 kB 364.82 kB +0.07% 80.38 kB 80.43 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.development.js +0.33% 363.64 kB 364.85 kB +0.07% 80.40 kB 80.46 kB
facebook-www/ReactDOMServer-dev.modern.js +0.33% 373.03 kB 374.26 kB +0.07% 81.01 kB 81.07 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.development.js +0.33% 368.56 kB 369.76 kB +0.06% 81.52 kB 81.57 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.development.js +0.33% 370.04 kB 371.25 kB +0.06% 82.01 kB 82.06 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.development.js +0.32% 370.45 kB 371.66 kB +0.05% 82.13 kB 82.17 kB
oss-experimental/react-dom/umd/react-dom-server.browser.development.js +0.32% 388.32 kB 389.58 kB +0.07% 83.09 kB 83.14 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.development.js +0.32% 370.74 kB 371.94 kB +0.06% 82.19 kB 82.24 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.development.js +0.32% 371.15 kB 372.35 kB +0.05% 82.31 kB 82.36 kB
oss-experimental/react-dom/umd/react-dom-server-legacy.browser.development.js +0.32% 389.18 kB 390.45 kB +0.06% 82.99 kB 83.04 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.development.js +0.32% 371.58 kB 372.79 kB +0.07% 82.12 kB 82.18 kB
oss-experimental/react-dom/cjs/react-dom-static.node.development.js +0.32% 372.20 kB 373.40 kB +0.05% 82.34 kB 82.38 kB
oss-experimental/react-dom/cjs/react-dom-server.node.development.js +0.32% 372.24 kB 373.44 kB +0.05% 82.25 kB 82.29 kB
facebook-www/ReactDOMServer-dev.classic.js +0.32% 380.45 kB 381.68 kB +0.07% 82.65 kB 82.70 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.development.js +0.32% 373.40 kB 374.60 kB +0.06% 82.58 kB 82.63 kB
facebook-www/ReactDOMServerStreaming-prod.modern.js +0.28% 141.81 kB 142.21 kB +0.19% 26.93 kB 26.98 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.production.min.js +0.22% 60.57 kB 60.70 kB +0.17% 18.51 kB 18.54 kB
oss-stable/react-dom/cjs/react-dom-server.browser.production.min.js +0.22% 60.60 kB 60.73 kB +0.18% 18.53 kB 18.56 kB
oss-stable-semver/react-dom/umd/react-dom-server.browser.production.min.js +0.21% 60.73 kB 60.86 kB = 18.76 kB 18.75 kB
oss-stable/react-dom/umd/react-dom-server.browser.production.min.js +0.21% 60.76 kB 60.89 kB = 18.78 kB 18.78 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.production.min.js +0.21% 62.45 kB 62.59 kB +0.19% 19.35 kB 19.38 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.production.min.js +0.21% 62.58 kB 62.71 kB +0.19% 19.40 kB 19.43 kB
oss-experimental/react-dom/umd/react-dom-server.browser.production.min.js +0.21% 62.73 kB 62.86 kB +0.14% 19.65 kB 19.68 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.production.min.js +0.21% 62.79 kB 62.92 kB +0.15% 19.48 kB 19.51 kB
oss-stable-semver/react-dom/cjs/react-dom-server.bun.production.min.js +0.21% 62.99 kB 63.12 kB +0.16% 18.94 kB 18.97 kB
oss-stable/react-dom/cjs/react-dom-server.bun.production.min.js +0.21% 63.02 kB 63.15 kB +0.16% 18.96 kB 18.99 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.production.min.js +0.20% 64.81 kB 64.94 kB +0.17% 19.93 kB 19.96 kB
oss-stable/react-dom/cjs/react-dom-server.edge.production.min.js +0.20% 64.84 kB 64.97 kB +0.18% 19.95 kB 19.99 kB

Generated by 🚫 dangerJS against 72b5f91

@gnoff gnoff force-pushed the preload-bootstrap-modules branch from 24f4565 to 72b5f91 Compare May 31, 2023 23:40
@gnoff gnoff merged commit ae31d2e into facebook:main May 31, 2023
@gnoff gnoff deleted the preload-bootstrap-modules branch May 31, 2023 23:48
github-actions bot pushed a commit that referenced this pull request May 31, 2023
stacked on #26753

Adds support for preloading bootstrapModules. We don't yet support
modules in Float's public interface but this implementation should be
compatible with what we do when we add it.

DiffTrain build for [ae31d2e](ae31d2e)
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
stacked on facebook#26753 

Adds support for preloading bootstrapModules. We don't yet support
modules in Float's public interface but this implementation should be
compatible with what we do when we add it.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
stacked on #26753

Adds support for preloading bootstrapModules. We don't yet support
modules in Float's public interface but this implementation should be
compatible with what we do when we add it.

DiffTrain build for commit ae31d2e.
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