-
Notifications
You must be signed in to change notification settings - Fork 453
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
⚡️ Remove artificial 4ms nextTick()
delay when running in a browser
#647
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also just realised that this PR won't actually help our situation 🤦🏼♂️ We have to include The only way this would help us is if we moved the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To discuss: we can do this, but should we do it?
The 4ms is probably in the standard for some reason, but I don't really know what. Presumably the original goal was to prevent CPU starvation, but I don't know why you would decree an arbitrary 4ms, and not just say that the time can't be guaranteed (and then it should be up to the vendor to defer event loop tasks if it needs to do other browsery things like repaint, etc.).
I note that Safari isn't standards-compliant (shocker), and doesn't actually seem to enforce this minimum time, so clearly someone thinks it's not too important to wait for this time.
I acknowledge that my proposed use-case is for tests, and maybe shouldn't impact Production-grade code.
One potential option is to add a flag that can select a
nextTick()
method? Or we just close this and I'll stick to my monkeypatch: