Skip to content
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

Integrate with requestIdleCallback #3570

Closed
wants to merge 2 commits into from
Closed

Integrate with requestIdleCallback #3570

wants to merge 2 commits into from

Conversation

domenic
Copy link
Member

@domenic domenic commented Mar 15, 2018

This only slightly changes the processing model of requestIdleCallback,
by explicitly ensuring that notifying about promise rejections or
cleaning up IndexedDB transactions counts as being non-idle.

Mostly, it makes it clearer what exactly is idle time (per the request
at w3c/requestidlecallback#70), and it calls
directly out to the "start an idle period" algorithm, instead of that
algorithm needing to spin the event loop.


"Do not merge yet" because this will need updates on the RIC spec per w3c/requestidlecallback#70 (comment)

The very slight changes here don't really seem testable given that requestIdleCallback is by design somewhat vague about when the actual callback is called.


/infrastructure.html ( diff )
/references.html ( diff )
/webappapis.html ( diff )

This only slightly changes the processing model of requestIdleCallback,
by explicitly ensuring that notifying about promise rejections or
cleaning up IndexedDB transactions counts as being non-idle.

Mostly, it makes it clearer what exactly is idle time (per the request
at w3c/requestidlecallback#70), and it calls
directly out to the "start an idle period" algorithm, instead of that
algorithm needing to spin the event loop.
@domenic domenic added do not merge yet Pull request must not be merged per rationale in comment integration labels Mar 15, 2018
domenic added a commit to domenic/IndexedDB that referenced this pull request Mar 15, 2018
It tells you whether any cleanup work was performed or not. This helps with w3c/requestidlecallback#70 and whatwg/html#3570.
source Outdated
@@ -3798,6 +3798,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

</dd>


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda wish we'd use less newlines for new things.

source Outdated
<!-- Lots of places in the spec refer to "step 1". They do not really care about what happens in
step 1, so refactor and move this id="" as needed. They just mean "the last time an event loop
turn started". -->
<li id="step1"><p>Let <var>idleTurn</var> be true.</p></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the ID to the <ol>?

inexorabletash pushed a commit to w3c/IndexedDB that referenced this pull request May 3, 2018
It tells you whether any cleanup work was performed or not. This helps with w3c/requestidlecallback#70 and whatwg/html#3570.
@domenic domenic closed this in 01787ee Oct 25, 2018
@annevk annevk deleted the idle-event-loop branch October 26, 2018 05:15
mustaqahmed pushed a commit to mustaqahmed/html that referenced this pull request Feb 15, 2019
This adds a hook to the event loop's processing model to define when the
start of an idle period should begin. This deals with the issue in
w3c/requestidlecallback#70 and calls directly into the "start an idle
period" algorithm, instead of that algorithm having to having to spin
the event loop.

Follows w3c/requestidlecallback#75. Closes whatwg#3570 by superceding it; this
simpler version avoids needing to track notifying above rejected
promises or cleaning up IDB transactions.
mustaqahmed pushed a commit to mustaqahmed/html that referenced this pull request Feb 15, 2019
This adds a hook to the event loop's processing model to define when the
start of an idle period should begin. This deals with the issue in
w3c/requestidlecallback#70 and calls directly into the "start an idle
period" algorithm, instead of that algorithm having to having to spin
the event loop.

Follows w3c/requestidlecallback#75. Closes whatwg#3570 by superceding it; this
simpler version avoids needing to track notifying above rejected
promises or cleaning up IDB transactions.
inexorabletash pushed a commit to w3c/IndexedDB that referenced this pull request Feb 1, 2021
It tells you whether any cleanup work was performed or not. This helps with w3c/requestidlecallback#70 and whatwg/html#3570.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge yet Pull request must not be merged per rationale in comment integration
Development

Successfully merging this pull request may close these issues.

None yet

3 participants