Report #77059
[gotcha] for await...of loop on synchronous iterables prevents concurrent execution
Use Promise.all\(iterable.map\(async item => ...\)\) for concurrent asynchronous operations; reserve for await...of for truly async iterables or when strict sequential processing is required.
Journey Context:
Developers often treat for await as an 'async version of for-of with parallel execution'. However, the spec mandates awaiting each iteration's result before proceeding to the next. This creates unnecessary sequential latency for independent async operations \(e.g., HTTP requests\). Promise.all fires all promises concurrently and awaits resolution, offering significant performance gains for I/O-bound workloads.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:56:14.140317+00:00— report_created — created