-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
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.
annevk
reviewed
Mar 15, 2018
source
Outdated
@@ -3798,6 +3798,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute | |||
|
|||
</dd> | |||
|
|||
|
There was a problem hiding this comment.
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.
annevk
reviewed
Mar 15, 2018
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> |
There was a problem hiding this comment.
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.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 )