Skip to content

[Flight] Track Owner on AsyncInfo and IOInfo #33395

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

Merged
merged 4 commits into from
Jun 3, 2025

Conversation

sebmarkbage
Copy link
Collaborator

Stacked on #33394.

This lets us create async stack traces to the owner that was in context when the I/O was started or awaited.

Screenshot 2025-06-01 at 12 31 52 AM

This owner might not be the immediate closest parent where the I/O was awaited.

@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jun 1, 2025
@react-sizebot
Copy link

react-sizebot commented Jun 1, 2025

Comparing: d8919a0...c2d27d5

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.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 529.82 kB 529.82 kB = 93.51 kB 93.51 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 650.91 kB 650.91 kB = 114.63 kB 114.63 kB
facebook-www/ReactDOM-prod.classic.js = 675.86 kB 675.86 kB = 118.91 kB 118.91 kB
facebook-www/ReactDOM-prod.modern.js = 666.14 kB 666.14 kB = 117.30 kB 117.30 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-server.node.development.js +0.36% 164.27 kB 164.87 kB +0.42% 30.66 kB 30.79 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-server.node.development.js +0.36% 164.30 kB 164.90 kB +0.36% 30.66 kB 30.77 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +0.35% 170.97 kB 171.57 kB +0.34% 31.75 kB 31.86 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +0.35% 172.11 kB 172.70 kB +0.34% 32.04 kB 32.15 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +0.35% 172.17 kB 172.77 kB +0.34% 32.05 kB 32.16 kB
oss-stable-semver/react-server/cjs/react-server-flight.development.js +0.21% 107.26 kB 107.49 kB +0.22% 19.94 kB 19.98 kB
oss-stable/react-server/cjs/react-server-flight.development.js +0.21% 107.26 kB 107.49 kB +0.22% 19.94 kB 19.98 kB

Generated by 🚫 dangerJS against c2d27d5

@sebmarkbage sebmarkbage merged commit 45da4e0 into facebook:main Jun 3, 2025
240 checks passed
sebmarkbage added a commit that referenced this pull request Jun 3, 2025
Stacked on #33395.

This lets us keep track of which environment this was fetched and
awaited.

Currently the IO and await is in the same environment. It's just kept
when forwarded. Once we support forwarding information from a Promise
fetched from another environment and awaited in this environment then
the await can end up being in a different environment.

There's a question of when the await is inside Flight itself such as
when you return a promise fetched from another environment whether that
should mean that the await is in the current environment. I don't think
so since the original stack trace is the best stack trace. It's only if
you `await` it in user space in this environment first that this might
happen and even then it should only be considered if there wasn't a
better await earlier or if reading from the other environment was itself
I/O.

The timing of *when* we read `environmentName()` is a little interesting
here too.
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