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

Parallel transitions: Assign different lanes to consecutive transitions #20672

Merged
merged 2 commits into from
Feb 8, 2021

Commits on Feb 8, 2021

  1. Land enableTransitionEntanglement changes

    Leaving the flag though because I plan to reuse it for additional,
    similar changes.
    acdlite committed Feb 8, 2021
    Configuration menu
    Copy the full SHA
    cb328f5 View commit details
    Browse the repository at this point in the history
  2. Assign different lanes to consecutive transitions

    Currently we always assign the same lane to all transitions. This means
    if there are two pending transitions at the same time, neither
    transition can finish until both can finish, even if they affect
    completely separate parts of the UI.
    
    The new approach is to assign a different lane to each consecutive
    transition, by shifting the bit to the right each time. When we reach
    the end of the bit range, we cycle back to the first bit. In practice,
    this should mean that all transitions get their own dedicated lane,
    unless we have more pending transitions than lanes, which should
    be rare.
    
    We retain our existing behavior of assigning the same lane to all
    transitions within the same event. This is achieved by caching the first
    lane assigned to a transition, then re-using that one until the next
    React task, by which point the event must have finished. This preserves
    the guarantee that all transition updates that result from a single
    event will be consistent.
    acdlite committed Feb 8, 2021
    Configuration menu
    Copy the full SHA
    261cf29 View commit details
    Browse the repository at this point in the history