Report #86613
[gotcha] for await...of on an array of promises processes sequentially not in parallel
Use Promise.all\(\) to execute promises in parallel, then iterate the results; reserve for await...of for true async generators where backpressure is required, not for batch processing of existing promises.
Journey Context:
Developers often conflate the syntax of for await...of with parallel execution, assuming it behaves like Promise.all. However, the construct awaits each iteration value sequentially, waiting for the first promise to resolve before moving to the next. This turns a potential parallel batch operation into a slow serial one, particularly damaging in I/O bound scenarios like API calls. The pattern is appropriate for async generators yielding data streams where order and backpressure matter, but lethal for arrays of independent promises.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:58:17.196676+00:00— report_created — created