Reputation: 177
I'm using nodejs for one of my server applications. But I found out there's some latency while running my app and I found that I didn't use await for a async function. Is there any performance issues while not using await for a async function?
Upvotes: 0
Views: 212
Reputation: 23768
The async-await is used to simplify the complexities created by nested callbacks. So, both async-await and callback patterns serialize asynchronous processes.
This means that one process fires after the completion of another and, this could be experienced as a latency depending on the application.
So, NO - async-await does not create any latency in its own right.
Upvotes: 1