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

Some browsers trigger their callbacks too early. #14734

Closed
floitschG opened this issue Nov 2, 2013 · 6 comments
Closed

Some browsers trigger their callbacks too early. #14734

floitschG opened this issue Nov 2, 2013 · 6 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-async type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@floitschG
Copy link
Contributor

Some browsers don't wait long enough before they trigger callbacks.
We should protect against this in our libraries.

For example async/timer_isolate_test is marked as flaky on IE and FF because of this.

@floitschG
Copy link
Contributor Author

Opera seems to have similar issues.
And our internal implementation is not good enough either: issue #10982

@blois
Copy link
Contributor

blois commented Nov 2, 2013

How much does timer coalescing come into play here? The standard Windows 7 timer has a resolution of 15ms, which can be overridden by apps. I can imaging browsers opting into lower resolutions for background tabs, etc as this is critical to conserving battery life.

The test which I saw which failed was called after 92ms for a 100ms timer.

I would be hesitant to try to build stricter timing semantics on top of browser timers and degrade battery perf by doing so.

@floitschG
Copy link
Contributor Author

It is completely ok to wait longer, but not to trigger earlier.
To me that's one of the two basic guarantees a timer should give:

  1. never trigger too early.
  2. keep the callbacks in order.

If you remove 1, you might as well use a simple Queue in your program...

Yes: that means that we will have to reschedule timers if they happen too early. I sincerely hope that we can fix this correctly in Chrome/Dartium, and only need to do this for other browsers.

@floitschG
Copy link
Contributor Author

I just noticed that most of the affected tests (not timer_isolate_test) already have a safety margin and still fail from time to time :(

@lrhn
Copy link
Member

lrhn commented May 5, 2014

Added Library-Async label.

@floitschG floitschG added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-async labels May 5, 2014
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@lrhn lrhn added the core-m label Aug 11, 2017
@floitschG floitschG removed the core-m label Aug 24, 2017
@floitschG
Copy link
Contributor Author

I can't see any flaky status file lines for this issue anymore.

Closing as obsolete.

@floitschG floitschG added the closed-obsolete Closed as the reported issue is no longer relevant label Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-async type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants