Files
singular-particular-space/skills/react-best-practices/rules/async-parallel.md
JL Kruger 5422131782 Initial commit — Singular Particular Space v1
Homepage (site/index.html): integration-v14 promoted, Writings section
integrated with 33 pieces clustered by type (stories/essays/miscellany),
Writings welcome lightbox, content frame at 98% opacity.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 12:09:22 +02:00

654 B
Raw Blame History

title, impact, impactDescription, tags
title impact impactDescription tags
Promise.all() for Independent Operations CRITICAL 2-10× improvement async, parallelization, promises, waterfalls

Promise.all() for Independent Operations

When async operations have no interdependencies, execute them concurrently using Promise.all().

Incorrect (sequential execution, 3 round trips):

const user = await fetchUser()
const posts = await fetchPosts()
const comments = await fetchComments()

Correct (parallel execution, 1 round trip):

const [user, posts, comments] = await Promise.all([
  fetchUser(),
  fetchPosts(),
  fetchComments()
])