w3ctag/design-reviews

Spec review for scheduler.yield()

Closed this issue · 1 comments

こんにちは TAG-さん!

I'm requesting a TAG review of scheduler.yield().

scheduler.yield() is an API for yielding control to the browser's event loop, which can be used to break up long tasks. Awaiting the promise returned by scheduler.yield() causes the current task to yield, continuing in a new browser task. This can be used to improve responsiveness issues caused by long tasks. Continuations are prioritized to mitigate performance problems of existing alternatives.

Further details:

  • [X ] I have reviewed the TAG's Web Platform Design Principles
  • Relevant time constraints or deadlines: We're hoping to ship this soon, pending feedback.
  • The group where the work on this specification is currently being done: WICG
  • The group where standardization of this work is intended to be done (if current group is a community group or other incubation venue): WHATWG
  • Major unresolved issues with or opposition to this specification:
  • This work is being funded by: Google

You should also know that...

  • The API has not substantially changed since the early design review
  • The feature builds on scheduler.postTask(), previously reviewed here
  • Because of the above, a "bigger picture" explainer was requested in the early design review, which can now be found here

The yield piece of the scheduling project looks good to us, with the caveat that if the rest of the scheduling project doesn't pan out, or if the different scheduler bits end up hanging off of other objects, we'll need to come back and rename scheduler.yield() to avoid having it hang off of an otherwise-empty object.