mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
Stacked on #33073. React semantics is that Suspense boundaries reveal with a throttle (300ms). That helps avoid flashing reveals when a stream reveals many individual steps back to back. It can also improve overall performance by batching the layout and paint work that has to happen at each step. Unfortunately we never implemented this for SSR streaming - only for client navigations. This is highly noticeable on very dynamic sites with lots of Suspense boundaries. It can look good with a client nav but feel glitchy when you reload the page or initial load. This fixes the Fizz runtime to be throttled and reveals batched into a single paint at a time. We do this by first tracking the last paint after the complete (this will be the first paint if `rel="expect"` is respected). Then in the `completeBoundary` operation we queue the operation and then flush it all into a throttled batch. Another motivation is that View Transitions need to operate as a batch and individual steps get queued in a sequence so it's extra important to include as much content as possible in each animated step. This will be done in a follow up for SSR View Transitions. |
||
|---|---|---|
| .. | ||
| babel | ||
| bench | ||
| ci | ||
| devtools | ||
| error-codes | ||
| eslint | ||
| eslint-rules | ||
| flags | ||
| flow | ||
| git | ||
| jest | ||
| perf-counters | ||
| prettier | ||
| print-warnings | ||
| react-compiler | ||
| release | ||
| rollup | ||
| shared | ||
| tasks | ||