Because microtasks are always scheduled concurrently, on the same thread, the VM needs to complete all the remaining work in the current microtask, as well as evaluate subsequent ones in order.
So,in the context of a for-await-of (or otherwise, any loop involving Await), at each step through the loop, the current task is suspended and the remaining microtasks are performed, before continuing the loop.
With Await, even if data is available synchronously, evaluation is always suspended and resumed in a later microtask.
With async genenerator yield statements, you defer evaluation for each value yielded to the caller (who themselves will likely await the result, deferring evaluation again), and also defer evaluation whenever the generator is resumed.
Basically, async functions and iterables introduce a lot of concurrent tasks which require waiting for the entire task queue to finish, and become more apparently slow if there are long-running microtasks.
Hello,