Dev Encyclopedia
ArticlesToolsContactAbout

Get notified when new content drops

No spam. Just new articles, tools, and updates straight to your inbox.

Dev Encyclopedia

A reference for builders

Content

  • Articles
  • Tools
  • About
  • Contact

Connect

  • support@devencyclopedia.com
  • RSS Feed

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

© 2026 Dev Encyclopedia

Back to top ↑
  1. Home
  2. /
  3. Tools
  4. /
  5. Async Timing Visualizer
Free · Live · No API key

See why Promise.all is faster. Watch it happen.

Configure async tasks, pick a pattern (sequential, Promise.all, or Promise.allSettled), and watch an animated Gantt chart show exactly when each task runs. Add failures to see how each pattern responds.

  1. 1

    Configure tasks

    Set duration and whether each task fails

  2. 2

    Pick a pattern

    Sequential, Promise.all, allSettled, for...of

  3. 3

    Watch it run

    Animated bars show real elapsed time

Zeeshan Tofiq

Zeeshan Tofiq

Full Stack Developer

When to use each pattern

Why it matters

3 independent 1-second API calls: sequential = 3s total, Promise.all = 1s total. The difference grows with every additional request.

Sequential await

Task B depends on Task A's result: fetch a user, then fetch their orders using the user ID.

const user = await fetchUser();
const orders = await fetchOrders(user.id);

Promise.all

Independent tasks where you need all results. One failure aborts everything.

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

Promise.allSettled

Independent tasks where partial results are acceptable (a dashboard that shows what it can).

const results = await Promise.allSettled([
  fetchUser(), fetchPosts()
]);

for...of + await

Sequential processing of an array: each item must complete before the next begins.

for (const id of orderIds) {
  await processOrder(id);
}

Frequently Asked Questions

How does the simulation work?
  • Each task: a JavaScript Promise wrapping a setTimeout of the configured duration.
  • Sequential mode: awaits each task before starting the next.
  • `Promise.all` mode: starts all tasks simultaneously, resolves when every task finishes.
  • `Promise.allSettled` mode: same as above, but collects all results even when some tasks fail.
  • Animation: bars track real wall-clock time using Date.now(). Nothing is faked or pre-calculated.
What does the fail toggle on each task do?

When toggled, the task's Promise rejects instead of resolves when its timer fires.

Promise.allPromise.allSettled
On rejectionEntire call rejects immediatelyRejection collected alongside successes
Other tasksStill complete, but outcome = failedAll settle normally
Use whenYou need every resultPartial success is acceptable
What does 'compare with sequential' do?
  • Sequential timeline: bars stack one after another, each task waiting for the previous.
  • Parallel timeline: bars all start at the same time, showing true concurrency.
  • Both run simultaneously so you see the timing difference side by side in real time.
Does this reflect real-world async performance?

Yes, for I/O-bound work like API calls and database queries. The timing ratios match what you would see with real requests of the same durations.

ℹ Info

Promise.all does not help with CPU-bound computation. JavaScript is single-threaded. Most async slowdowns in web apps are I/O, not CPU, so Promise.all gives real speed gains in practice.

Why does for...of look the same as sequential?

Because it is. for...of with await is sequential execution in a loop: each iteration awaits the previous before starting the next.

javascript
// These two are identical in timing behavior:

// Option 1: explicit sequential awaits
const a = await fetchA();
const b = await fetchB();

// Option 2: for...of with await (same timing, cleaner for arrays)
for (const id of ids) {
  await processItem(id);
}

Related reading

Guide

5 async/await Mistakes That Slow Your JavaScript Code

The companion article: sequential awaits, await in forEach, missing Promise.all, and more with before/after fixes.

Guide

npm Scripts You're Probably Not Using

run-p and run-s let you run npm scripts in parallel or series, the same tradeoff you just visualized, applied to your build pipeline.

Zeeshan Tofiq

Zeeshan Tofiq

Full Stack Developer

Full stack developer with over 6 years of experience building production applications. Writes practical guides on JavaScript, TypeScript, React, Node.js, and cloud infrastructure. Focused on helping developers solve real problems with clean, maintainable code.

Enjoyed this article?

Get practical dev guides, tool updates, and new articles delivered straight to your inbox. No spam, unsubscribe anytime.

Tasks

Task A
1000ms
Task B
1500ms
Task C
800ms
Sequential total3300ms
Parallel total (approx.)1500ms
Speedup2.2×

Execution Pattern

Equivalent JavaScript

javascript
// ✅ Promise.all — ~1500ms total
const [taska, taskb, taskc] = await Promise.all([
  fetchTaska(),
  fetchTaskb(),
  fetchTaskc(),
]);