-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Drop async
in the frontend?
#4035
Comments
Not this is particularly helpful, but I have no idea 😄 |
@Daniel15 any chance you could offer some quick insight on this? |
@paulmelnikow - Just catching up on my emails... Sorry I missed this! Async/await is natively supported by the vast majority of browsers (~91% of users, as per https://caniuse.com/#feat=async-functions). Native async/await is actually more efficient than promises these days: And Chrome also has "zero-cost async stack traces", which means error stack traces include the entire async stack when using native async/await (whereas this is prohibitively expensive to do with callbacks or promises) We could potentially have two bundles: One for modern browsers, and one for legacy browsers. |
We no longer have any |
My understanding is that the global transform which transforms
async
calls in the frontend to promises adds a lot of bloat to the frontend build.Does anyone know if that is true / still true?
We only use
async
in a few places and I think we could replace these with promises.The text was updated successfully, but these errors were encountered: