-
Notifications
You must be signed in to change notification settings - Fork 419
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
Use setTimeout
for async work
#922
Conversation
Using a local profile directory, this works on modern Linux, too: karma-runner/karma-firefox-launcher#183 (comment)
This can be reproduced somewhat locally using the Firefox headless runner, but only when running the whole test suite. Executing only the scheduler specs passes. Current assumption is that we don't properly cleanup the scheduler, or that Firefox swallows the |
Requests to requestAnimationFrame may be dropped, depending on how the browser feels. If we want to reliably ensure work gets done, we have to setTimeout(work) things. Closes #921
923b948
to
fadba41
Compare
As suspected this is about Firefox dropping frames under high load (aka huge page) setups. In order to reliably do stuff we have to |
Hmm maybe we should not rush it. This causes some tests to fail on my machine (MacOS, Chrome Headless 129). |
I'll check on fresh install. |
OK so I guess I am now suffering from the same problem as Firefox before the changes. On main, I can |
And the tests are very old, rather unrelated to scheduler. |
Proposed Changes
Requests to requestAnimationFrame may be dropped, depending on how the browser feels. This is what makes tests under Ubuntu/Firefox fail, but it may also cause issues in other high stress scenarios.
If we want to reliably ensure work gets done, we have to
setTimeout(work)
things. This is what I propose in 8f33e8b.Closes #921
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}