5 ms·
Most of the time that IS what you want in general in node, as if you start running anything with even moderate CPU time (let alone a call to an external service
by taurath 11y ago
Most of the time that IS what you want in general in node, as if you start running anything with even moderate CPU time (let alone a call to an external service) you block the event loop and chug the system. The big performance gain you get with node in the form of max simultaneous connections per clock you get from not blocking. Most (95%+) of packages I've seen use callbacks, and maybe ~10% expose promise interfaces even if they use them internally.