You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Scheduler implementation for JavaScript tries to use setImmediate, when available (and right now it's only available on Node.js). Otherwise, it does a fallback to setTimeout, but this operation is throttled by browsers on repeated calls to 4ms, which can be terrible for performance.
An alternative, in browsers, is to fallback on window.postMessage.
The text was updated successfully, but these errors were encountered:
alexandru
changed the title
JavaScript Scheduler implementation should also try to use window.postMessage
JavaScript Scheduler should use window.postMessage, when setImmediate not available
May 9, 2022
The
Scheduler
implementation for JavaScript tries to usesetImmediate
, when available (and right now it's only available on Node.js). Otherwise, it does a fallback tosetTimeout
, but this operation is throttled by browsers on repeated calls to 4ms, which can be terrible for performance.An alternative, in browsers, is to fallback on
window.postMessage
.See this
setImmediate
polyfill for inspiration: https://github.com/YuzuJS/setImmediateThe text was updated successfully, but these errors were encountered: