NodeJS - How do make sure your app is performant?
Hello guys,
Lately I've been trying to understand how to make performant nodejs APIs and to better understand memory usage I turned my attention to pm2.
The problem that I am having is that I don't know how I can be sure that my application is within good levels of performance, so that I know I'm not making dumb mistakes in my code which can cause huge issues.
For now what I've gathered is that with node 8.2.1 I get between 70 and 80 memory usage.
Edit: For example in my case if I remove import 'babel-polyfill'
it will give me back about 10mb, and that is a huge difference. Using pm2 I was able to comment some code out (mainly imports) and it gave me a bigger perception of what the problem was. Another problem was that I was using node-schedule and that was my biggest problem, taking about 40mb.
The boilerplate I use is github.com/fpicoitoj/nodejs-api-boilerplate. It's my own version of this one github.com/developit/express-es6-rest-api.
Whatever information you can share with me as to how become better would be greatly appreciated.