I’d like to propose moving this repo to WICG:
Intent to implement: https://groups.google.com/a/chromium.org/d/msg/blink-dev/eLq8t56CbaQ/KdbOY7ZHCwAJ
(from the Intent thread)
Summary This (umbrella) intent covers a set of proposed APIs for main thread scheduling, for improved user responsiveness. Separate Intents will also be sent for individual APIs.
Motivation It is too difficult to build web apps that are responsive to user interaction, and that remain responsive over time. Script is a primary culprit that hurts responsiveness.
Consider a “search-as-you-type” application: this app needs to be responsive to user input i.e. user typing in the search-box. At the same time any animations on the page must be rendered smoothly, as well as the work for fetching, preparing and displaying search results must progress quickly.
This is a lot of different deadlines for an app developer to contend with; it is hard to reason about and correctly use myriad existing APIs as well workarounds for missing hooks.
Today this also requires an understanding of the browser’s rendering engine to plug into the right places. It is easy for script running at inopportune times to hold up the main thread and cause responsiveness issues.
This problem can be tackled by systematically chunking and scheduling main thread work i.e. prioritizing and executing work async at an appropriate time relative to current situation of user and browser. This proposal explores a set of APIs to achieve this, towards the goal of improving guarantees of responsiveness.