-
Notifications
You must be signed in to change notification settings - Fork 540
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
unnecessary async? #3610
Comments
For those that does an explicit For others, I'm not 100% sure |
Stacktraces. |
Can you please elaborate? I mean, we dont await most of the "wrapped" promises. |
If a promise is awaited or returned by an async function, that async function will show up in stack traces. Those are publicly visible functions, so it might make sense to keep. |
We dont have TCO in v8. So shouldnt we still see the stack trace properly? |
No it wouldn't. V8 has async stack trace support. |
do you see any performance benenefit by avoiding async notation in cases where we dont await the promise? |
Yes, there is a performance benefit. As for when skipping it... It really depends on the place. If it's an internal function that is very hot, I'd recommend skipping. If it's a public function, then it's better to keep it. |
Is there a reason we have some async functions which dont need to be async?
The text was updated successfully, but these errors were encountered: