#966: Spec review for scheduler.yield()

Visit on Github.

Opened Jun 6, 2024

こんにちは 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

Discussions

2024-08-26

Minutes

Martin we were gonna assign it ... this is a piece of a larger thing. Piece looks fine on its own... but would benefit look at broader effort.