I just noticed that something was tapping out both my CPU & RAM pretty hard. I ran top to see what it was and it turns out that gradle is launching into daemon mode, and playing pacman with my system resources for no good reason.
Did some digging and realized that for some reason ionic (or something it depends on), is actually passing a build flag in that basically tells gradle “Hey, despite the fact that you’re a massive resource hog, please feel free to chill out in daemon mode and chow down on the system resources! That way the user can wait a solid 5 seconds in between key presses, but hey no worries, we might shave 30 seconds on build times!”
I tried to change the setting in ~/.gradle/gradle.properties but of course it’s being ignored since the flag is being passed in on the command line higher up in the build process.
What the heck is setting -Dorg.gradle.daemon=true and more importantly how do I make it stop?
This daemon is no joke, it’s happily chewing up 10% of my CPU and 60% of my RAM, just sitting there doing absolutely nothing useful for me.
Doing a ps to get the process id and then killing it with kill -s SIGTERM is making both my computer and the build process (when I relaunch a build) run much faster, but that’s a heck of a kludge for something that shouldn’t be on by default in the first place.