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

[Suspense] Change Suspending and Restarting Heuristics #15769

Merged
merged 13 commits into from
May 30, 2019

Commits on May 30, 2019

  1. 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.
    sebmarkbage committed May 30, 2019
    Configuration menu
    Copy the full SHA
    30e95ff View commit details
    Browse the repository at this point in the history
  2. Change suspense heuristic

    This now eagerly commits non-delayed suspended trees, unless they're
    only retries in which case they're throttled to 500ms.
    sebmarkbage committed May 30, 2019
    Configuration menu
    Copy the full SHA
    154dfcf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2c0a43d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    95390da View commit details
    Browse the repository at this point in the history
  5. 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.
    sebmarkbage committed May 30, 2019
    Configuration menu
    Copy the full SHA
    0467bb2 View commit details
    Browse the repository at this point in the history
  6. 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.
    sebmarkbage committed May 30, 2019
    Configuration menu
    Copy the full SHA
    2301f05 View commit details
    Browse the repository at this point in the history
  7. 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.
    sebmarkbage committed May 30, 2019
    Configuration menu
    Copy the full SHA
    c9f459d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    913bbfc View commit details
    Browse the repository at this point in the history
  9. Update snapshot tests for user timing tests

    I also added a blank initial render to ensuree that we cover the suspended
    case.
    sebmarkbage committed May 30, 2019
    Configuration menu
    Copy the full SHA
    c4ded0f View commit details
    Browse the repository at this point in the history
  10. 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.
    sebmarkbage committed May 30, 2019
    Configuration menu
    Copy the full SHA
    6a3dde2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8eb717a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e176a6b View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2e1c5ea View commit details
    Browse the repository at this point in the history