iberezh
← All writing
· Next.js

3 awaits vs Promise.all

A Next.js Server Component loading user, orders and stats took 731 ms.

Each await waited for the one before it, but the 3 calls don't depend on each other.

With Promise.all they run at the same time: 346 ms. I changed one line.

Discussion on X

Next: Looking for a Redis alternative →