Me and my colleague are trying to optimize our enterprise Angular 12 application.
The Problem:
Straight away, we noticed that the biggest problem about developing our application is that the memory usage is steadily increasing with each time the angular CLI recompiles the project (after pressing CTRL+S). It works fine for some time but after a few recompiles, the memory hits over 4000MB and the angular CLI crashes.
What We Tried:
After turning up the memory capacity to 24 gigabytes, we noticed that the project compiles much faster (at least two times faster). However, the memory usage will still keep increasing until it hits its cap and crashes, (of course 24 gigs of RAM is no solution anyways), so there definitively is a memory leak.
The Question:
How are we supposed to find out what exactly causes this problem? We tried lots of things, like removing all of our modules and let it recompile(with errors of course because we removed our modules) but the RAM usage still kept rising. I think the problem might come from some "random" NPM module but i am not really sure. If this helps: we are using asp.net zero boilerplate.