How to Profile and Optimize Node.js Performance with Worker Threads
Measure event-loop delay and CPU cost before optimizing, capture a CPU profile, move genuinely CPU-bound work to a reusable worker pool, and avoid adding workers to ordinary asynchronous I/O.