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

[Re-land] Make prerendering always non-blocking: Add missing feature flag checks #31238

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

jackpope
Copy link
Contributor

This is a partial re-land of #31056. We saw breakages surface after the original land and had to revert. Now that they've been fixed, let's try this again. This time we'll split up the commits to give us more control of testing and rollout internally.

Original PR: #31056
Original Commit: 2a9fb44
Revert PR: #31080

Commit description:

Neglected to wrap some places in the enableSiblingPrerendering flag.

Neglected to wrap some places in the enableSiblingPrerendering flag.
Copy link

vercel bot commented Oct 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 14, 2024 3:39pm

@jackpope jackpope requested review from acdlite and removed request for acdlite October 14, 2024 15:35
@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label Oct 14, 2024
@jackpope jackpope requested a review from acdlite October 14, 2024 15:35
@react-sizebot
Copy link

Comparing: b60286b...0a6548f

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 = 507.80 kB 506.33 kB = 90.79 kB 90.58 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 = 512.74 kB 511.26 kB = 91.51 kB 91.30 kB
facebook-www/ReactDOM-prod.classic.js +0.03% 603.22 kB 603.42 kB +0.03% 106.69 kB 106.73 kB
facebook-www/ReactDOM-prod.modern.js +0.03% 579.41 kB 579.61 kB +0.03% 102.79 kB 102.82 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-reconciler/cjs/react-reconciler.development.js = 651.61 kB 650.08 kB = 104.62 kB 104.45 kB
oss-experimental/react-dom/cjs/react-dom-profiling.profiling.js = 550.15 kB 548.76 kB = 97.81 kB 97.57 kB
react-native/implementations/ReactNativeRenderer-dev.js = 644.26 kB 642.58 kB = 105.62 kB 105.42 kB
oss-stable/react-reconciler/cjs/react-reconciler.development.js = 635.40 kB 633.73 kB = 102.04 kB 101.85 kB
oss-stable-rc/react-reconciler/cjs/react-reconciler.development.js = 635.38 kB 633.71 kB = 102.02 kB 101.82 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.development.js = 635.38 kB 633.71 kB = 102.02 kB 101.82 kB
react-native/implementations/ReactFabric-dev.js = 634.26 kB 632.58 kB = 103.83 kB 103.63 kB
oss-experimental/react-art/cjs/react-art.development.js = 570.11 kB 568.55 kB = 92.24 kB 92.06 kB
oss-stable/react-dom/cjs/react-dom-profiling.profiling.js = 538.34 kB 536.85 kB = 95.57 kB 95.34 kB
oss-stable-rc/react-dom/cjs/react-dom-profiling.profiling.js = 538.23 kB 536.74 kB = 95.54 kB 95.31 kB
oss-stable-semver/react-dom/cjs/react-dom-profiling.profiling.js = 538.23 kB 536.74 kB = 95.54 kB 95.31 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.production.js = 527.46 kB 525.99 kB = 95.14 kB 94.91 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-dev.js = 581.65 kB 580.02 kB = 94.72 kB 94.52 kB
facebook-www/ReactTestRenderer-dev.classic.js = 573.52 kB 571.88 kB = 93.86 kB 93.63 kB
facebook-www/ReactTestRenderer-dev.modern.js = 573.51 kB 571.87 kB = 93.86 kB 93.63 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 512.74 kB 511.26 kB = 91.51 kB 91.30 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 507.80 kB 506.33 kB = 90.79 kB 90.58 kB
oss-stable-rc/react-dom/cjs/react-dom-client.production.js = 507.70 kB 506.22 kB = 90.77 kB 90.56 kB
oss-stable-semver/react-dom/cjs/react-dom-client.production.js = 507.70 kB 506.22 kB = 90.77 kB 90.56 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.development.js = 548.79 kB 547.15 kB = 89.75 kB 89.56 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.development.js = 548.76 kB 547.12 kB = 89.74 kB 89.55 kB
oss-stable-rc/react-test-renderer/cjs/react-test-renderer.development.js = 548.73 kB 547.09 kB = 89.73 kB 89.54 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.development.js = 548.73 kB 547.09 kB = 89.73 kB 89.54 kB
oss-stable/react-art/cjs/react-art.development.js = 552.69 kB 550.98 kB = 89.50 kB 89.30 kB
oss-stable-rc/react-art/cjs/react-art.development.js = 552.62 kB 550.92 kB = 89.48 kB 89.27 kB
oss-stable-semver/react-art/cjs/react-art.development.js = 552.62 kB 550.92 kB = 89.48 kB 89.27 kB
oss-experimental/react-reconciler/cjs/react-reconciler.profiling.js = 422.19 kB 420.70 kB = 68.77 kB 68.60 kB
react-native/implementations/ReactNativeRenderer-profiling.js = 387.29 kB 385.81 kB = 67.14 kB 66.96 kB
oss-stable/react-reconciler/cjs/react-reconciler.profiling.js = 410.21 kB 408.61 kB = 66.58 kB 66.39 kB
oss-stable-rc/react-reconciler/cjs/react-reconciler.profiling.js = 410.19 kB 408.59 kB = 66.56 kB 66.37 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.profiling.js = 410.19 kB 408.59 kB = 66.56 kB 66.37 kB
react-native/implementations/ReactFabric-profiling.js = 378.63 kB 377.15 kB = 65.45 kB 65.27 kB
oss-experimental/react-reconciler/cjs/react-reconciler.production.js = 388.90 kB 387.33 kB = 63.68 kB 63.50 kB
react-native/implementations/ReactNativeRenderer-prod.js = 361.92 kB 360.46 kB = 63.29 kB 63.11 kB
oss-stable/react-reconciler/cjs/react-reconciler.production.js = 383.82 kB 382.26 kB = 62.85 kB 62.67 kB
oss-stable-rc/react-reconciler/cjs/react-reconciler.production.js = 383.80 kB 382.24 kB = 62.83 kB 62.65 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.production.js = 383.80 kB 382.24 kB = 62.83 kB 62.65 kB
react-native/implementations/ReactFabric-prod.js = 353.26 kB 351.80 kB = 61.80 kB 61.63 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js = 346.94 kB 345.47 kB = 60.23 kB 60.06 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js = 325.01 kB 323.55 kB = 57.18 kB 57.01 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.production.js = 307.92 kB 306.43 kB = 54.44 kB 54.26 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.production.js = 307.73 kB 306.25 kB = 54.40 kB 54.22 kB
oss-stable-rc/react-test-renderer/cjs/react-test-renderer.production.js = 307.67 kB 306.18 kB = 54.38 kB 54.20 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.production.js = 307.67 kB 306.18 kB = 54.38 kB 54.20 kB
oss-experimental/react-art/cjs/react-art.production.js = 302.15 kB 300.67 kB = 51.91 kB 51.71 kB
oss-stable/react-art/cjs/react-art.production.js = 297.64 kB 296.15 kB = 51.17 kB 50.96 kB
oss-stable-rc/react-art/cjs/react-art.production.js = 297.57 kB 296.09 kB = 51.15 kB 50.94 kB
oss-stable-semver/react-art/cjs/react-art.production.js = 297.57 kB 296.09 kB = 51.15 kB 50.94 kB

Generated by 🚫 dangerJS against 12b04c1

@jackpope jackpope merged commit 13411e4 into facebook:main Oct 14, 2024
184 checks passed
@jackpope jackpope deleted the reland-nonblocking-sync-prerenders branch October 14, 2024 18:12
github-actions bot pushed a commit that referenced this pull request Oct 14, 2024
…flag checks (#31238)

This is a partial re-land of
#31056. We saw breakages surface
after the original land and had to revert. Now that they've been fixed,
let's try this again. This time we'll split up the commits to give us
more control of testing and rollout internally.

Original PR: #31056
Original Commit:
2a9fb44
Revert PR: #31080

Commit description:
```
Neglected to wrap some places in the enableSiblingPrerendering flag.
```

Co-authored-by: Andrew Clark <[email protected]>

DiffTrain build for [13411e4](13411e4)
github-actions bot pushed a commit that referenced this pull request Oct 14, 2024
…flag checks (#31238)

This is a partial re-land of
#31056. We saw breakages surface
after the original land and had to revert. Now that they've been fixed,
let's try this again. This time we'll split up the commits to give us
more control of testing and rollout internally.

Original PR: #31056
Original Commit:
2a9fb44
Revert PR: #31080

Commit description:
```
Neglected to wrap some places in the enableSiblingPrerendering flag.
```

Co-authored-by: Andrew Clark <[email protected]>

DiffTrain build for [13411e4](13411e4)
github-actions bot pushed a commit to AnselK/react that referenced this pull request Oct 15, 2024
…flag checks (facebook#31238)

This is a partial re-land of
facebook#31056. We saw breakages surface
after the original land and had to revert. Now that they've been fixed,
let's try this again. This time we'll split up the commits to give us
more control of testing and rollout internally.

Original PR: facebook#31056
Original Commit:
facebook@2a9fb44
Revert PR: facebook#31080

Commit description:
```
Neglected to wrap some places in the enableSiblingPrerendering flag.
```

Co-authored-by: Andrew Clark <[email protected]>

DiffTrain build for [13411e4](facebook@13411e4)
github-actions bot pushed a commit to AnselK/react that referenced this pull request Oct 15, 2024
…flag checks (facebook#31238)

This is a partial re-land of
facebook#31056. We saw breakages surface
after the original land and had to revert. Now that they've been fixed,
let's try this again. This time we'll split up the commits to give us
more control of testing and rollout internally.

Original PR: facebook#31056
Original Commit:
facebook@2a9fb44
Revert PR: facebook#31080

Commit description:
```
Neglected to wrap some places in the enableSiblingPrerendering flag.
```

Co-authored-by: Andrew Clark <[email protected]>

DiffTrain build for [13411e4](facebook@13411e4)
jackpope added a commit that referenced this pull request Oct 15, 2024
Follows #31238

___

This is a partial re-land of
#31056. We saw breakages surface
after the original land and had to revert. Now that they've been fixed,
let's try this again. This time we'll split up the commits to give us
more control of testing and rollout internally.

Original PR: #31056
Original Commit:
4c71025
Revert PR: #31080

Commit description:

> When a synchronous update suspends, and we prerender the siblings, the
prerendering should be non-blocking so that we can immediately restart
once the data arrives.
>
> This happens automatically when there's a Suspense boundary, because
we immediately commit the boundary and then proceed to a Retry render,
which are always concurrent. When there's not a Suspense boundary, there
is no Retry, so we need to take care to switch from the synchronous work
loop to the concurrent one, to enable time slicing.

Co-authored-by: Andrew Clark <[email protected]>
github-actions bot pushed a commit that referenced this pull request Oct 15, 2024
Follows #31238

___

This is a partial re-land of
#31056. We saw breakages surface
after the original land and had to revert. Now that they've been fixed,
let's try this again. This time we'll split up the commits to give us
more control of testing and rollout internally.

Original PR: #31056
Original Commit:
4c71025
Revert PR: #31080

Commit description:

> When a synchronous update suspends, and we prerender the siblings, the
prerendering should be non-blocking so that we can immediately restart
once the data arrives.
>
> This happens automatically when there's a Suspense boundary, because
we immediately commit the boundary and then proceed to a Retry render,
which are always concurrent. When there's not a Suspense boundary, there
is no Retry, so we need to take care to switch from the synchronous work
loop to the concurrent one, to enable time slicing.

Co-authored-by: Andrew Clark <[email protected]>

DiffTrain build for [6c4bbc7](6c4bbc7)
github-actions bot pushed a commit that referenced this pull request Oct 15, 2024
Follows #31238

___

This is a partial re-land of
#31056. We saw breakages surface
after the original land and had to revert. Now that they've been fixed,
let's try this again. This time we'll split up the commits to give us
more control of testing and rollout internally.

Original PR: #31056
Original Commit:
4c71025
Revert PR: #31080

Commit description:

> When a synchronous update suspends, and we prerender the siblings, the
prerendering should be non-blocking so that we can immediately restart
once the data arrives.
>
> This happens automatically when there's a Suspense boundary, because
we immediately commit the boundary and then proceed to a Retry render,
which are always concurrent. When there's not a Suspense boundary, there
is no Retry, so we need to take care to switch from the synchronous work
loop to the concurrent one, to enable time slicing.

Co-authored-by: Andrew Clark <[email protected]>

DiffTrain build for [6c4bbc7](6c4bbc7)
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.

5 participants