4 ms·
At the moment I'd teach one on Node.js backend performance optimization.
by labarilem 4y ago
At the moment I'd teach one on Node.js backend performance optimization.
- Raed667 4y agoI'd be interested in that! Any links you can recommend ?
- labarilem 4y agoOff the top of my head: - Understand the event loop to avoid blocking - Understand the JIT compiler to write compiler optimization-friendly code - With Typescript: speed up build and dev times using the SWC compiler, understand which types take more compilation time - Minimize heap allocations to avoid memory leaks: https://blog.appsignal.com/2022/09/28/minimize-heap-allocations-in-nodejs.html https://blog.appsignal.com/2022/09/28/minimize-heap-allocati... - Write native modules when you need CPU intensive operations (the official doc is quite good: https://nodejs.org/api/addons.html https://nodejs.org/api/addons.html) - Take care of node_modules (e.g. https://mainmatter.com/blog/2022/09/29/pnpm/ https://mainmatter.com/blog/2022/09/29/pnpm/) - With Docker: optimize docker image to only include what you need. E.g. use Alpine if you don't have any particular external dependencies
- Raed667 4y agoThanks !