NoNode.js · Lesson 5 of 7
Async Patterns
Node.js is built around async I/O. Understanding how the event loop works — and the patterns that emerge from it — is the key to writing fast, non-blocking Node code.
✦ Tip
Node.js is single-threaded but non-blocking. CPU-intensive work (image processing, encryption, parsing) blocks the event loop. Move it to `worker_threads` or a child process. Use `--prof` or the built-in `node --inspect` + Chrome DevTools to profile before optimizing.
Node.js is single-threaded but non-blocking. CPU-intensive work (image processing, encryption, parsing) blocks the event loop. Move it to `worker_threads` or a child process. Use `--prof` or the built-in `node --inspect` + Chrome DevTools to profile before optimizing.