⬅️ NodeJS Best Practice 🔗 GH
- Don’t block the event loop: Avoid CPU intensive tasks as they will block the mostly single-threaded Event Loop and offload those to a dedicated thread, process or even a different technology based on the context.
- Prefer native JS methods over user-land utils like Lodash
NOTE
”Here’s a good rule of thumb for keeping your Node server speedy: Node is fast when the work associated with each client at any given time is ‘small’.”
Checkout Node Clinic.