runningcode / gradle-doctor

The right prescription for your Gradle build.
http://runningcode.github.io/gradle-doctor
Apache License 2.0
723 stars 47 forks source link

" this build needs more heap space." Which heap should I increase? #190

Closed ColtonIdle closed 2 years ago

ColtonIdle commented 2 years ago

I was greeted with this warning today. I'm a noob at this whole jvmargs/vs kotlin args/vs gradle daemon args, etc.

Where would I allocate more heap space? Do I give it to the IDE?

=============================== Gradle Doctor Prescriptions ============================================
| This build spent 76% garbage collecting.                                                             |
| If this is the first build with this Daemon, it likely means that this build needs more heap space.  |
| Otherwise, if this is happening after several builds it could indicate a memory leak.                |
| For a quick fix, restart this Gradle daemon. ./gradlew --stop                                        |
========================================================================================================
runningcode commented 2 years ago

This specifically refers to only the heap space of the Gradle build daemon. There are a few ways to set it but most projects set it using the jvm args in the project's gradle.properties file. Here is an example of where this is set for the Gradle Doctor: https://github.com/runningcode/gradle-doctor/blob/master/gradle.properties#L1

PR's welcome to make this message or relevant documentation more clear.

ColtonIdle commented 2 years ago

Thanks for confirming!