-
Notifications
You must be signed in to change notification settings - Fork 56
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
Task Scheduling #72
Comments
As @domenic said, CSS should probably refactor https://html.spec.whatwg.org/#processing-model-8 to make things work for them. Review would be good, but I suspect for quite a bit of it we're bound by compatibility. |
Probably need to enumerate all the timings in the system, then figure out what a "tick" might be, and describe what feature areas understand which ticks, which APIs slot into which ticks. Whether there might be paired responses (dependency control). Task re-ordering? Lots of things to consider. Should also look at various frameworks (like fastdom) and understand what scheduling policies are in use. |
Taken up at Stockholm f2f. |
Scheduled for 5/16 to work through it. We agreed to work on it in the London F2F but that we would need to do some prep work ahead of time. /cc @travisleithead |
Discussed at London F2F - possible we might create a note that "explains how this all works together." |
Some thoughts during discussion in the breakout session: Potential problem: no opportunity to process input during the rendering loop (which some consider higher-priority than rendering)? Invariants? What are they? Background processing: (for things in background tabs, (or potentially in non-visible iframes, etc.) slowing the render-loop frequency (or enabling it to be time-sliced to process foreground work, can lead to increased queue sizes in the background tab, which can lead to 'jank' in the foreground tab when the background tab finally drains all the queues. Where should certain processing be done relative to where layout is computed? Should be based on how the API might use layout info (e.g., wse layout data vs. set style data): |
We would want some guideance in our design-principles doc, about where a callback should slot into the Rendering Loop, or whether it should be a new task. See w3ctag/design-principles#38 |
So a few further thoughts here:
Another way of thinking about the input processing issue is this: we want the rendering loop itself to be as small as possible so that we can get back to the event loop to do other things (e.g., processing input). It's also nice to tie some of the input processing to the refresh loop so that we can batch it and avoid unnecessary processing (e.g., mouse movement or touch coalescing). These two things seem to conflict a little bit, though maybe it's not a big deal. (Is it well-defined when microtasks and nanotasks run in response to any event dispatch that's tied to the rendering loop, or to any other callouts to user script?) But, really, this issue is waiting for somebody to do the work of understanding and testing this. (Sorry, this comment might not be completely intelligible, but we need to move on to a scheduled discussion in the meeting now...) |
I just want to reemphasize that while it is good people are working to understand this section of the spec and implementations, I do not believe it's something that should end up in this design principles document. There are no design principles here to be had. Perhaps a blog post explaining things, or a pull request to the spec adding more non-normative explanatory text, or more tests to be written. But those are different. |
This issue isn't in the design-principles repo. It's the design-reviews (formerly spec-reviews) repo. |
I guess I was over-extrapolating from
|
I'm hoping to write a bunch of tests for this section, as part of the investigation of w3ctag/design-reviews#72, and this is the first one. It tests that request animation frame callbacks happen in the correct order across multiple documents. Gecko, Chromium, and WebKit all fail in different (and nondeterministic) ways, although I've seen occasional passes.
I'm hoping to write a bunch of tests for this section, as part of the investigation of w3ctag/design-reviews#72, and this is the first one. It tests that request animation frame callbacks happen in the correct order across multiple documents. Gecko, Chromium, and WebKit all fail in different (and nondeterministic) ways, although I've seen occasional passes.
…section of HTML., a=testonly Automatic update from web-platform-tests Add one test for "Update the Rendering" section of HTML. (#15510) I'm hoping to write a bunch of tests for this section, as part of the investigation of w3ctag/design-reviews#72, and this is the first one. It tests that request animation frame callbacks happen in the correct order across multiple documents. Gecko, Chromium, and WebKit all fail in different (and nondeterministic) ways, although I've seen occasional passes. -- wpt-commits: 9e96f63ccd0a6e2f5f6511ff1aa8aaaa708b494f wpt-pr: 15510
…section of HTML., a=testonly Automatic update from web-platform-tests Add one test for "Update the Rendering" section of HTML. (#15510) I'm hoping to write a bunch of tests for this section, as part of the investigation of w3ctag/design-reviews#72, and this is the first one. It tests that request animation frame callbacks happen in the correct order across multiple documents. Gecko, Chromium, and WebKit all fail in different (and nondeterministic) ways, although I've seen occasional passes. -- wpt-commits: 9e96f63ccd0a6e2f5f6511ff1aa8aaaa708b494f wpt-pr: 15510
I'm hoping to write a bunch of tests for this section, as part of the investigation of w3ctag/design-reviews#72, and this is the first one. It tests that request animation frame callbacks happen in the correct order across multiple documents. Gecko, Chromium, and WebKit all fail in different (and nondeterministic) ways, although I've seen occasional passes.
…section of HTML., a=testonly Automatic update from web-platform-tests Add one test for "Update the Rendering" section of HTML. (#15510) I'm hoping to write a bunch of tests for this section, as part of the investigation of w3ctag/design-reviews#72, and this is the first one. It tests that request animation frame callbacks happen in the correct order across multiple documents. Gecko, Chromium, and WebKit all fail in different (and nondeterministic) ways, although I've seen occasional passes. -- wpt-commits: 9e96f63ccd0a6e2f5f6511ff1aa8aaaa708b494f wpt-pr: 15510 UltraBlame original commit: 42f4ccf2ea71530e3bbc66c964504c2ee6ef229f
…section of HTML., a=testonly Automatic update from web-platform-tests Add one test for "Update the Rendering" section of HTML. (#15510) I'm hoping to write a bunch of tests for this section, as part of the investigation of w3ctag/design-reviews#72, and this is the first one. It tests that request animation frame callbacks happen in the correct order across multiple documents. Gecko, Chromium, and WebKit all fail in different (and nondeterministic) ways, although I've seen occasional passes. -- wpt-commits: 9e96f63ccd0a6e2f5f6511ff1aa8aaaa708b494f wpt-pr: 15510 UltraBlame original commit: 42f4ccf2ea71530e3bbc66c964504c2ee6ef229f
…section of HTML., a=testonly Automatic update from web-platform-tests Add one test for "Update the Rendering" section of HTML. (#15510) I'm hoping to write a bunch of tests for this section, as part of the investigation of w3ctag/design-reviews#72, and this is the first one. It tests that request animation frame callbacks happen in the correct order across multiple documents. Gecko, Chromium, and WebKit all fail in different (and nondeterministic) ways, although I've seen occasional passes. -- wpt-commits: 9e96f63ccd0a6e2f5f6511ff1aa8aaaa708b494f wpt-pr: 15510 UltraBlame original commit: 42f4ccf2ea71530e3bbc66c964504c2ee6ef229f
This is related to #489... which I was actually briefly confusing with this issue. |
So @atanassov and I looked into this in a breakout at our virtual "Cork" face-to-face meeting. There's clearly still stuff to improve about the platform here. But we've had this issue open for five years, and it hasn't caused a lot of progress to happen (I did write one test, at least). So we think it probably makes sense to close this not because it's fixed but because it's unlikely to lead to further progress. (That said; there are some other issues that may lead to some progress; see previous comment.) And it's still possible that I or someone else will find time to look into some of the remaining issues. |
The CSS Houdini effort is looking to specify a pipeline model for execution of script in layout/raster: https://docs.google.com/document/d/1Mw6qNw8UAEfW96CXaXRVYPPZjqQS3YdK7v57wFttAhs/edit?pli=1#
This (re)raises the question about ordering for delivery of other tasks in the platform (Mutation Observer change records,
Object.observe
records,setTimeout
callbacks,setIdleCallback
callbacks,requestAnimationFrame
callback delivery). This has been discussed at some length, e.g., with @wycats at TC39.The open question here is if the TAG should try to untangle this and generate a recommendation for scheduling in the non-layout/raster bits of frame generation.
/cc @annevk
The text was updated successfully, but these errors were encountered: