-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Make prerendering always non-blocking #31056
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
23a9f12
to
a90a7b1
Compare
Neglected to wrap some places in the enableSiblingPrerendering flag.
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.
a90a7b1
to
4c71025
Compare
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. DiffTrain build for commit 0f1856c.
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. DiffTrain build for [0f1856c](0f1856c)
This reverts commit 0f1856c.
…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 <git@andrewclark.io>
…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 <git@andrewclark.io> DiffTrain build for [13411e4](13411e4)
…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 <git@andrewclark.io> DiffTrain build for [13411e4](13411e4)
…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 <git@andrewclark.io> DiffTrain build for [13411e4](facebook@13411e4)
…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 <git@andrewclark.io> DiffTrain build for [13411e4](facebook@13411e4)
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 <git@andrewclark.io>
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 <git@andrewclark.io> DiffTrain build for [6c4bbc7](6c4bbc7)
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 <git@andrewclark.io> DiffTrain build for [6c4bbc7](6c4bbc7)
|
||
if (exitStatus !== RootInProgress) { | ||
do { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving let renderWasConcurrent = shouldTimeSlice;
inside of the do means the places it's set below won't matter (and GCC strips the assignments from the build).
This means when you hit the isRenderConsistentWithExternalStores
case, it will get into a sync render loop if the exit status is RootSuspended.
Depends on
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.