-
Notifications
You must be signed in to change notification settings - Fork 46k
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
[Suspense] Change Suspending and Restarting Heuristics #15769
Commits on May 30, 2019
-
Track most recent commit time of a fallback globally
This value is going to be used to avoid committing too many fallback states in quick succession. It doesn't really matter where in the tree that happened. This means that we now don't really need the concept of SuspenseState other than has a flag. It could be made cheaper/simpler.
Configuration menu - View commit details
-
Copy full SHA for 30e95ff - Browse repository at this point
Copy the full SHA 30e95ffView commit details -
This now eagerly commits non-delayed suspended trees, unless they're only retries in which case they're throttled to 500ms.
Configuration menu - View commit details
-
Copy full SHA for 154dfcf - Browse repository at this point
Copy the full SHA 154dfcfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c0a43d - Browse repository at this point
Copy the full SHA 2c0a43dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 95390da - Browse repository at this point
Copy the full SHA 95390daView commit details -
Track whether we have a ping on the currently rendering level
If we get a ping on this level but have not yet suspended, we might still suspend later. In that case we should still restart.
Configuration menu - View commit details
-
Copy full SHA for 0467bb2 - Browse repository at this point
Copy the full SHA 0467bb2View commit details -
Add comment about moving markers
We should add this to throwException so we get these markers earlier. I've had to rewrite tests that test restarting to account for the delayed restarting heuristic. Ideally, we should also be able to restart from within throwException if we're already ready to restart. Right now we wait until the next yield.
Configuration menu - View commit details
-
Copy full SHA for 2301f05 - Browse repository at this point
Copy the full SHA 2301f05View commit details -
Make ReactLazy tests less specific on asserting intermediate states
They're not testing the exact states of the suspense boundaries, only the result. I keep assertions that they're not already resolved early.
Configuration menu - View commit details
-
Copy full SHA for c9f459d - Browse repository at this point
Copy the full SHA c9f459dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 913bbfc - Browse repository at this point
Copy the full SHA 913bbfcView commit details -
Update snapshot tests for user timing tests
I also added a blank initial render to ensuree that we cover the suspended case.
Configuration menu - View commit details
-
Copy full SHA for c4ded0f - Browse repository at this point
Copy the full SHA c4ded0fView commit details -
Adjust Suspense tests to account for new heuristics
Mostly this just means render the Suspense boundary first so that it becomes an update instead of initial mount.
Configuration menu - View commit details
-
Copy full SHA for 6a3dde2 - Browse repository at this point
Copy the full SHA 6a3dde2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8eb717a - Browse repository at this point
Copy the full SHA 8eb717aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e176a6b - Browse repository at this point
Copy the full SHA e176a6bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e1c5ea - Browse repository at this point
Copy the full SHA 2e1c5eaView commit details