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

Adjust SuspenseList CPU bound heuristic #17455

Merged
merged 2 commits into from
Dec 3, 2019

Commits on Dec 3, 2019

  1. Adjust SuspenseList CPU bound heuristic

    In SuspenseList we switch to rendering fallbacks (or stop rendering further
    rows in the case of tail="collapsed/hidden") if it takes more than 500ms
    to render the list. The limit of 500ms is similar to the train model and
    designed to be short enough to be in the not noticeable range.
    
    This works well if each row is small because we time the 500ms range well.
    However, if we have a few large rows then we're likely to exceed the limit
    by a lot. E.g. two 480ms rows hits almost a second instead of 500ms.
    
    This PR adjusts the heuristic to instead compute whether something has
    expired based on the render time of the last row. I.e. if we think rendering
    one more row would exceed the timeout, then we don't attempt.
    
    This still works well for small rows and bails earlier for large rows.
    
    The expiration is still based on the start of the list rather than the
    start of the render. It should probably be based on the start of the render
    but that's a bigger change and needs some thought.
    sebmarkbage committed Dec 3, 2019
    Configuration menu
    Copy the full SHA
    3d77108 View commit details
    Browse the repository at this point in the history
  2. Comment

    sebmarkbage committed Dec 3, 2019
    Configuration menu
    Copy the full SHA
    1c7a133 View commit details
    Browse the repository at this point in the history