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

Faster queueMicrotask? #15

Open
FrozenVoid opened this issue Jan 6, 2021 · 0 comments
Open

Faster queueMicrotask? #15

FrozenVoid opened this issue Jan 6, 2021 · 0 comments
Labels
enhancement New feature or request on hold

Comments

@FrozenVoid
Copy link

FrozenVoid commented Jan 6, 2021

Current implementation use setTimeouts, there is a faster version from MDN

 `typeof queueMicrotask !== 'function' && (queueMicrotask = function (callback) {
    Promise.resolve()
      .then(callback)        }
                    )`

https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/queueMicrotask
Its also possible to implement
0ms setTimeout via https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage

@JustOff JustOff added the enhancement New feature or request label Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on hold
Projects
None yet
Development

No branches or pull requests

2 participants