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

requestIdleCallback: Explicit algorithm for idle callback "deadline" #7166

Merged
merged 18 commits into from
Nov 15, 2021

Commits on Nov 13, 2021

  1. Explicit algorithm for idle callback "deadline"

    The algorithm replaces the algorithm that is currently defined in prose
    here: https://w3c.github.io/requestidlecallback/#the-idledeadline-interface).
    
    It works as such:
    - Timers can calculate their estimated next callback timestamps,
      based on their start time and document-inactive time so far.
    - The deadline for idle tasks for an event loop is the earliest between:
      - The time until the next timer callback in this event loop is estimated
        to fire.
      - The time until the next render, estimated at16ms after the start of
        the previous task that had a rended opportunity, if there are
        pending requestAnimationFrame callbacks.
      - 50ms
    
    TODO: the deadline is currently checked between windows, it needs to be
    re-checked between callbacks in the same window.
    
    See w3c/requestidlecallback#71
    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    f87739e View commit details
    Browse the repository at this point in the history
  2. rendering

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    0581126 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f399e90 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2f40613 View commit details
    Browse the repository at this point in the history
  5. Add note

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    8001958 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5925b9f View commit details
    Browse the repository at this point in the history
  7. Remove extra line

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    9274cea View commit details
    Browse the repository at this point in the history
  8. Address task-source

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    75fae99 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1cef3cb View commit details
    Browse the repository at this point in the history
  10. Revamp after PR review

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    f5e5ba0 View commit details
    Browse the repository at this point in the history
  11. PR nits

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    a5fcd1a View commit details
    Browse the repository at this point in the history
  12. Formalize suspend/resume

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    bb6190a View commit details
    Browse the repository at this point in the history
  13. Clean up clearing

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    7030e62 View commit details
    Browse the repository at this point in the history
  14. Shift stuff around

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    bf6958b View commit details
    Browse the repository at this point in the history
  15. Indent

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    866426b View commit details
    Browse the repository at this point in the history
  16. More PR nits

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    4a9c291 View commit details
    Browse the repository at this point in the history
  17. Minor fixes

    domenic authored and noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    1d86883 View commit details
    Browse the repository at this point in the history
  18. Remove leftover step 3

    noamr committed Nov 13, 2021
    Configuration menu
    Copy the full SHA
    3af534e View commit details
    Browse the repository at this point in the history