Broken Promises
summary
Performance audits show Node apps allocating thousands of promises in synchronous code paths, for example a case that creates 30,000 promises during a 30 second benchmark and a demo that allocates 8,000 promises inside a loop, which blocks the event loop and drops throughput to 4 requests per second. Errors become unhandled rejections, file descriptors leak, long .then chains (15–16 deep) and mixing callbacks with promises break error propagation. Use trace events/Chrome tracing, util.promisify, avoid promises in tight loops, and prefer Promise.all only when you accept continuing background work.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:00Promises are powerful
- 4:02Set Interval
- 11:00Async Promises
- 12:40Unhandled Rejection
- 14:30Mixing Promises
- 20:20Chaining
- 22:35Async Functions
- 23:20Resolve Promises
- 24:00Loops
- 26:20Promises







