Contact emails
shas...@chromium.org, jap...@chromium.org
Spec
Explainer: https://github.com/WICG/main-thread-scheduling/blob/master/PrioritizedPostTask.md.
Summary
Userspace tasks often have varying degrees of importance (related to user experience), but the Platform lacks a unified API to schedule prioritized work. The postTask API allows developers to schedule tasks (javascript callbacks) with a native browser scheduler at 3 levels of priority: user-blocking, user-visible, and background. It also exposes a TaskController, which can be used to dynamically cancel tasks and change their priority.
Link to “Intent to Prototype” blink-dev discussion
https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/HvqbB7TGJKU/xda9kTXGBAAJ
Goals for experimentation
We’re looking for feedback on API shape, performance, and usefulness of the MVP.
API shape:
- We want to validate that the new Signal/Controller-based API is ergonomic for developers (the shape has evolved quite a bit). Is it easy to use/integrate with existing schedulers or app code?
- We also want feedback on the priorities: are the priorities intuitive/useful? Are there (general) use cases that aren’t captured by these priorities? (See explainer for more discussion around number of priorities).
Performance:
We’re relying on site-specific latency and responsiveness metrics for measuring performance. Specifically, we’re looking to find out if site-specific performance improves, regresses, or stays the same. The outcome can depend on a lot of factors, e.g. does the site already have a scheduler? how much of the page does the site own? how well does the implementation’s approach to integrating postTask tasks and tasks from other task sources work? Our hypothesis is that performance shouldn’t regress, but we want to validate this. And if it does regress performance, we want to understand why and possibly vary the implementation.
Usefulness of the MVP: We’re looking to answer a couple questions here:
1. Does the API simplify scheduling?
2. Is the postTask MVP useful enough on its own, or are there vital features missing? For example, are there enough guarantees/predictability around postTask priorities to be useful, or are priorities needed elsewhere (e.g. fetch, IDB)?
Experimental timeline
We’d like to experiment in M81-M83.
Any risks when the experiment finishes?
No.
Ongoing technical constraints
None.
Debuggability
Given the complex nature of scheduling, we think this feature will benefit greatly from DevTools integration, minimally:
1. The API should work with async call stacks (this was already landed).
2. Timeline integration -- when tasks are posted, priority of tasks that run, etc. We plan to implement this in the near term.
There are likely other integrations that developers would benefit from, and we’re planning to work with partners on determining what integration will make debugging easier. Some of this will be informed by their experience with the OT.
Will this feature be supported on all five Blink platforms supported by Origin Trials (Windows, Mac, Linux, Chrome OS, and Android)?
Yes.
Link to entry on the feature dashboard
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAKXGoJ189-_48cMn%3D4deTU8f3y%2B1Jhmk1Eh%2BHqGFVhEhMnTHcA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEivKs-HdzSB7XEVeeEo0CPeOwN2sULbnzf8ZFxNqiF5jg%40mail.gmail.com.
Do you have partners lined up to start testing in the M81 timeframe?
Do you have partners lined up to start testing in the M81 timeframe?Yes, we’re working with React folks on integrating it into their scheduler, and they plan to run the OT on Facebook. We’re working on outreach to more interested partners. Depending on response, we might need to push the timeline back by a release, but I'm hoping we can start in M81.