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

[Flight] Move pendingChunks ref count increment into createTask #28260

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

sebmarkbage
Copy link
Collaborator

Every time we create a task we need to wait for it so we increase a ref count. We can do this in createTask. This is in line with what Fizz does too.

They differ in that Flight counts when they're actually flushed where as Fizz decrements them when they complete.

Flight should probably count them when they complete so it's possible to wait for the end before flushing for buffering purposes.

@react-sizebot
Copy link

Comparing: 30e2938...9c17e1b

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 = 176.66 kB 176.66 kB = 55.01 kB 55.01 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 178.65 kB 178.65 kB = 55.59 kB 55.59 kB
facebook-www/ReactDOM-prod.classic.js = 591.78 kB 591.78 kB = 104.44 kB 104.44 kB
facebook-www/ReactDOM-prod.modern.js = 575.53 kB 575.53 kB = 101.54 kB 101.54 kB
test_utils/ReactAllWarnings.js Deleted 67.02 kB 0.00 kB Deleted 16.42 kB 0.00 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-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js = 26.83 kB 26.78 kB +0.01% 9.17 kB 9.17 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js = 26.83 kB 26.78 kB +0.01% 9.17 kB 9.17 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js = 26.73 kB 26.68 kB = 9.07 kB 9.07 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js = 26.73 kB 26.68 kB = 9.07 kB 9.07 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.min.js = 26.48 kB 26.43 kB = 9.03 kB 9.03 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.min.js = 26.48 kB 26.43 kB = 9.03 kB 9.03 kB
oss-stable-semver/react-server-dom-turbopack/umd/react-server-dom-turbopack-server.browser.production.min.js = 26.10 kB 26.04 kB = 8.95 kB 8.95 kB
oss-stable/react-server-dom-turbopack/umd/react-server-dom-turbopack-server.browser.production.min.js = 26.10 kB 26.04 kB = 8.95 kB 8.95 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.min.js = 25.99 kB 25.93 kB = 8.88 kB 8.87 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.min.js = 25.99 kB 25.93 kB = 8.88 kB 8.87 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-server.node.production.min.js = 25.25 kB 25.20 kB = 8.79 kB 8.78 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-server.node.production.min.js = 25.25 kB 25.20 kB = 8.79 kB 8.78 kB
facebook-www/ReactFlightDOMServer-prod.modern.js = 38.78 kB 38.69 kB = 8.78 kB 8.76 kB
oss-experimental/react-server/cjs/react-server-flight.production.min.js = 18.54 kB 18.48 kB = 6.61 kB 6.60 kB
oss-stable-semver/react-server/cjs/react-server-flight.production.min.js = 16.18 kB 16.13 kB = 5.96 kB 5.95 kB
oss-stable/react-server/cjs/react-server-flight.production.min.js = 16.18 kB 16.13 kB = 5.96 kB 5.95 kB
test_utils/ReactAllWarnings.js Deleted 67.02 kB 0.00 kB Deleted 16.42 kB 0.00 kB

Generated by 🚫 dangerJS against 9c17e1b

@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label Feb 6, 2024
@sebmarkbage sebmarkbage merged commit 0d11563 into facebook:main Feb 6, 2024
36 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 6, 2024
Every time we create a task we need to wait for it so we increase a ref
count. We can do this in `createTask`. This is in line with what Fizz
does too.

They differ in that Flight counts when they're actually flushed where as
Fizz decrements them when they complete.

Flight should probably count them when they complete so it's possible to
wait for the end before flushing for buffering purposes.

DiffTrain build for [0d11563](0d11563)
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
…book#28260)

Every time we create a task we need to wait for it so we increase a ref
count. We can do this in `createTask`. This is in line with what Fizz
does too.

They differ in that Flight counts when they're actually flushed where as
Fizz decrements them when they complete.

Flight should probably count them when they complete so it's possible to
wait for the end before flushing for buffering purposes.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
Every time we create a task we need to wait for it so we increase a ref
count. We can do this in `createTask`. This is in line with what Fizz
does too.

They differ in that Flight counts when they're actually flushed where as
Fizz decrements them when they complete.

Flight should probably count them when they complete so it's possible to
wait for the end before flushing for buffering purposes.

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

None yet

3 participants