Node.js RAM usage when run from a run config vs. a terminal

When I run “npm run start” from a terminal, the “ng serve” process takes about 2GB of RAM. If I run it from a run config in Webstorm, the same “ng serve” process takes 23GB of RAM which isn't reasonable.

0

The memory usage of the ng serve is equal for me when starting it from within the IDE and externally. And this is not surprising as all the IDE does is starting the command. Please could you share screenshots illustrating the issue?

0

I figured this out.

The root cause of the problem was having a lot of extraneous files (many gigabytes) in my src/assets directory. When ng serve runs, it loads all of the assets files into memory.

The reason it was happening in Webstorm, but not from the command line is that I have two clones of the repository. The clone that I was using Webstorm with had a lot of files while the other clone didn't. I cleaned up the files and all is well.

Thank you for your attention!

0

Thanks for clearing it up!

0

请先登录再写评论。