-
Notifications
You must be signed in to change notification settings - Fork 45
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
How do we measure the effectiveness of this API? #61
Comments
Hi @sefeng211, Airbnb wrote a blog post about how they used cc @calinoracation (Airbnb) who wrote the post and worked with us while developing the API. |
Hi @shaseley & @sefeng211. We are using The other nice thing is the API is unified, folks don't need to think about using We also added on additional capabilities to our React wrapper that let's us implement a We always have more work to do, but postTask is now a really highly used tool that many of our folks have adopted and gotten really nice gains from. |
Thanks @calinoracation , That was a good read and very helpful! |
Does anyone know other users of the API? Or is there any new feedback from Airbnb? The API itself doesn't really add new primitives to the platform, so everything could be implemented using a polyfill. There are some unclear parts of the API, like how TaskPriority actually should affect to scheduling vs other tasks which aren't using postTask. API users might think "background" for example is something similar to idle handling, but that is not how it is specified. Or that "user-blocking" tasks get run before user input or visual updates, but that isn't how it is defined either. |
@shaseley do we know the status of React and Ember? are they still interested in this API? |
I'm not sure about Ember - I think that was before I was involved on this. The last I spoke with React, they were thinking it would make more sense for them to use it in conjunction with Datadog started using it recently for their dashboards, and @gvergnaud might be able to comment further. I suspect we'll start see more usage as we work with sites on improving Interaction-to-Next-Paint (INP), because scheduling plays a big role there. Long tasks negatively affect responsiveness, so breaking them up is key. You can do that by scheduling smaller bits (i.e. use @smaug---- regarding prioritization semantics, you're right that a lot of the behavior is left up to the UA. This was intentional because there was initially concern (I think from Boris on the initial TAG review) about creating a total ordering of priorities and limiting a UA's ability to experiment with prioritization between different task types. I agree that we wouldn't want to do that, so I left things largely up to the UA (but well-defined for In Chrome, the priority of "background" is similar to The other thing is that if priorities are to be meaningful across a page (e.g. between a framework and 1P, library and 1P, etc.), the scheduler needs to be centralized. The browser is the natural place to do this, otherwise everything needs to use the same polyfill. |
Since input aligns with rAF, and there is plenty of time between rAFs, can "user-blocking" tasks run before input? Because of rAF alignment, input priority is kind of special in Firefox at least, or rather, it is special when rAF is ticking at all. Having "background" meaning lower priority than most others is a major thing. That is a new feature to the platform, but the spec doesn't really define that. And how does "user-blocking" actually work in Chrome? Is it higher priority than vsync/raf ? Nothing of this is defined in the spec, yet would/has lead to incompatible implementations. It feels like the spec should be a bit more descriptive on the priorities and how it is supposed to work with other tasks not defined in this spec. (I know, priorities are hard. We want to keep the flexibility to reorder things when needed, yet some hints how things are supposed to behave would be good.) |
Hey! For the sake of giving an additional data point, here is how we use the scheduler API at @DataDog. We use this new API and its polyfill pretty extensively. We've seen significant perf improvements on our dashboards by splitting long rendering tasks into one task per "widget". We assign either a "user-visible" or a "background" priority based on whether they're in the viewport or not, which means we have to update theses priorities as users scroll the page. We are pretty happy with the ergonomics of this new scheduler API, which makes updating a task's priority over time very easy! This experiment has been very successful and we would like to keep using this API, so let us know if we can support its standardization in any way! I just tested the Firefox Nightly implementation and it works like a charm. I'd be pretty interested in trying to use Let me know if you have specific questions about our use case, I'd be happy to help in any way 🙂 |
We (Firefox) have it prototyped in Nightly, but we have zero knowledge about how this API is being used in real website.
I wonder if anyone have some concrete examples of some real website usage of this API, to answer some questions like how's it being used, how does the same task gets done before and after the API, how is the task faster than before?
Any thoughts/ideas/suggestions on this topic would be appreciated.
The text was updated successfully, but these errors were encountered: