-
Notifications
You must be signed in to change notification settings - Fork 19
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
Allow requesting a minimum time budget #49
Comments
@cramforce you probably want to use We did discuss ~this earlier: #28 (comment). |
@igrigorik the point is that the code is complicated and buggy. This needs to be solved in the platform. |
Yep, no disagreement there. I'm just linking to previous discussions on this for context. |
I see the need for this, but I was thinking of how this would work when a script using minimum budget runs in contexts with different idle profiles. Wouldn't a minimum time budget make a developer less encouraged in splitting up the work a callback performs? This would favor platforms with less idle time, which could be a problem. This is of course the case with rIC already, but could this make it worse? |
There are lots of tasks that cannot be split up in any meaningful way: E.g.
load a Youtube or Instagram embed. Given no better choice it is typically
best to do these tasks when the user is least likely to interact.
…On Mon, Oct 23, 2017 at 4:40 AM, Andreas Farre ***@***.***> wrote:
I see the need for this, but I was thinking of how this would work when a
script using minimum budget runs in contexts with different idle profiles.
Wouldn't a minimum time budget make a developer less encouraged in
splitting up the work a callback performs? This would favor platforms with
less idle time, which could be a problem. This is of course the case with
rIC already, but could this make it worse?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#49 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFeT_3fG2V-H-hB7UO1LwAnYN9VCSV2ks5svHtBgaJpZM4Kacpz>
.
|
@cramforce |
I think that if |
@shaseley, is this something that we should add to the spec? |
I my experience every use of
requestIdleCallback
will eventually have a wrapper like this one:…where rIC is called recursively until a time budget under some requirement is reached. Among other things this requires managing the timeout in user code, because one will typically want a timeout across these calls.
This would be fixed by allowing the caller to pass in something like
minimumTimeRemaining
into the rIC options object.The text was updated successfully, but these errors were encountered: