Skip to content

Conversation

sebmarkbage
Copy link
Collaborator

The theory here is that when we reveal a boundary coming from the server we want to paint that before hydrating it. Hydration gets scheduled in a macrotask with the scheduler but it's in theory possible that it runs before the paint. If that's the case, then the JS that runs before yielding during hydration might slightly delay the paint and we might miss a window to skip the previous paint.

@sebmarkbage sebmarkbage requested a review from gnoff August 16, 2025 16:11
@meta-cla meta-cla bot added the CLA Signed label Aug 16, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Aug 16, 2025
@react-sizebot
Copy link

Comparing: 546bac7...5710a79

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 = 530.18 kB 530.18 kB = 93.39 kB 93.39 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 = 655.81 kB 655.86 kB = 115.31 kB 115.32 kB
facebook-www/ReactDOM-prod.classic.js = 675.58 kB 675.63 kB +0.01% 118.54 kB 118.55 kB
facebook-www/ReactDOM-prod.modern.js = 666.00 kB 666.06 kB +0.01% 116.87 kB 116.88 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +3.83% 2,024.94 kB 2,102.46 kB +3.32% 293.96 kB 303.72 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +3.83% 2,024.94 kB 2,102.46 kB +3.32% 293.96 kB 303.72 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +3.83% 2,025.12 kB 2,102.64 kB +3.32% 293.99 kB 303.75 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +3.82% 2,029.41 kB 2,106.93 kB +3.31% 294.96 kB 304.72 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +3.82% 2,029.41 kB 2,106.93 kB +3.31% 294.96 kB 304.72 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +3.82% 2,029.59 kB 2,107.11 kB +3.31% 294.98 kB 304.75 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/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +3.83% 2,024.94 kB 2,102.46 kB +3.32% 293.96 kB 303.72 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +3.83% 2,024.94 kB 2,102.46 kB +3.32% 293.96 kB 303.72 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +3.83% 2,025.12 kB 2,102.64 kB +3.32% 293.99 kB 303.75 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +3.82% 2,029.41 kB 2,106.93 kB +3.31% 294.96 kB 304.72 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +3.82% 2,029.41 kB 2,106.93 kB +3.31% 294.96 kB 304.72 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +3.82% 2,029.59 kB 2,107.11 kB +3.31% 294.98 kB 304.75 kB
react-native/implementations/ReactFabric-dev.fb.js = 751.93 kB 749.17 kB = 119.42 kB 118.91 kB
react-native/implementations/ReactFabric-profiling.fb.js = 451.07 kB 448.41 kB = 75.34 kB 74.83 kB
react-native/implementations/ReactFabric-prod.fb.js = 381.54 kB 378.88 kB = 65.95 kB 65.46 kB

Generated by 🚫 dangerJS against 5710a79

@sebmarkbage
Copy link
Collaborator Author

Notably I didn't change the client render one since that doesn't add anything new to paint first so that's immediate.

@sebmarkbage sebmarkbage merged commit 7a36dfe into facebook:main Aug 16, 2025
246 of 247 checks passed
github-actions bot pushed a commit that referenced this pull request Aug 16, 2025
The theory here is that when we reveal a boundary coming from the server
we want to paint that before hydrating it. Hydration gets scheduled in a
macrotask with the scheduler but it's in theory possible that it runs
before the paint. If that's the case, then the JS that runs before
yielding during hydration might slightly delay the paint and we might
miss a window to skip the previous paint.

DiffTrain build for [7a36dfe](7a36dfe)
github-actions bot pushed a commit to code/lib-react that referenced this pull request Aug 17, 2025
…ook#34220)

The theory here is that when we reveal a boundary coming from the server
we want to paint that before hydrating it. Hydration gets scheduled in a
macrotask with the scheduler but it's in theory possible that it runs
before the paint. If that's the case, then the JS that runs before
yielding during hydration might slightly delay the paint and we might
miss a window to skip the previous paint.

DiffTrain build for [7a36dfe](facebook@7a36dfe)
github-actions bot pushed a commit to code/lib-react that referenced this pull request Aug 17, 2025
…ook#34220)

The theory here is that when we reveal a boundary coming from the server
we want to paint that before hydrating it. Hydration gets scheduled in a
macrotask with the scheduler but it's in theory possible that it runs
before the paint. If that's the case, then the JS that runs before
yielding during hydration might slightly delay the paint and we might
miss a window to skip the previous paint.

DiffTrain build for [7a36dfe](facebook@7a36dfe)
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.

3 participants