
JavaScript
Why `await` inside a loop is slow: the event loop and microtasks
A for loop with await runs your async work one item at a time. Here is what the event loop and the microtask queue are doing, and three ways to fix it, with timings from a real run.
By StackNothing 6 min read