Skip to content

[Fizz] Unblock SuspenseList when prerendering #33321

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 2 commits into from
May 21, 2025

Conversation

sebmarkbage
Copy link
Collaborator

There's an interesting case when a SuspenseList is partially prerendered but some of the completed boundaries are blocked by rows to be resumed.

This handles it but just unblocking the future rows to avoid stalling.

However, the correct semantics will need special handling in the postponed state.

@sebmarkbage sebmarkbage requested review from gnoff and eps1lon May 21, 2025 02:50
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label May 21, 2025
@react-sizebot
Copy link

react-sizebot commented May 21, 2025

Comparing: 3710c4d...e36c8f2

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.83 kB 529.83 kB = 93.52 kB 93.52 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 = 651.73 kB 651.57 kB = 114.81 kB 114.78 kB
facebook-www/ReactDOM-prod.classic.js = 676.00 kB 675.81 kB = 118.91 kB 118.87 kB
facebook-www/ReactDOM-prod.modern.js = 666.28 kB 666.09 kB = 117.30 kB 117.26 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/cjs/react-server.production.js +0.21% 131.20 kB 131.47 kB +0.10% 23.00 kB 23.03 kB
oss-stable/react-server/cjs/react-server.production.js +0.21% 131.20 kB 131.47 kB +0.10% 23.00 kB 23.03 kB

Generated by 🚫 dangerJS against e36c8f2

The act of aborting changes the result and should be the thing that flushes.
@sebmarkbage sebmarkbage force-pushed the resumesuspenselist branch from 713286c to e36c8f2 Compare May 21, 2025 19:19
@sebmarkbage sebmarkbage merged commit f4041aa into facebook:main May 21, 2025
240 checks passed
github-actions bot pushed a commit that referenced this pull request May 21, 2025
There's an interesting case when a SuspenseList is partially prerendered
but some of the completed boundaries are blocked by rows to be resumed.

This handles it but just unblocking the future rows to avoid stalling.

However, the correct semantics will need special handling in the
postponed state.

DiffTrain build for [f4041aa](f4041aa)
sebmarkbage added a commit that referenced this pull request May 22, 2025
Follow up to #33321.

We can mark boundaries that were blocked in the prerender as postponed
but without anything to replayed inside them. That way they're not
emitted in the prerender but is unblocked when replayed.

Technically this does some unnecessary replaying of the path to the
otherwise already completed boundary but it simplifies our model by just
marking the boundary as needing replaying.
github-actions bot pushed a commit that referenced this pull request May 22, 2025
Follow up to #33321.

We can mark boundaries that were blocked in the prerender as postponed
but without anything to replayed inside them. That way they're not
emitted in the prerender but is unblocked when replayed.

Technically this does some unnecessary replaying of the path to the
otherwise already completed boundary but it simplifies our model by just
marking the boundary as needing replaying.

DiffTrain build for [99781d6](99781d6)
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