ImNotOkay, a GC experiment for Android CI builds
Inspired by a very specific early-2000s song, I’m presenting a new garbage collector policy for Android CI builds: ImNotOkayGC org.gradle.jvmargs=-Xmx5g -XX:+UseImNotOkayGC This collector is meant ...

Source: DEV Community
Inspired by a very specific early-2000s song, I’m presenting a new garbage collector policy for Android CI builds: ImNotOkayGC org.gradle.jvmargs=-Xmx5g -XX:+UseImNotOkayGC This collector is meant for large Android builds, where memory pressure quietly builds up across tasks, variants, and modules, and when memory finally runs out, instead of pretending everything is fine, it tells you exactly how bad things really are. [GC] I’m fine. :app:generateReleaseRFile FROM-CACHE :app:compileReleaseKotlin [GC] Actually I’m not fine. [GC] Full GC. [GC] It didn’t help. Funny, right? Consider this my small April Fools contribution. Jokes aside, I wanted to try something more serious. Ephemeral Android CI Builds This is an idea I had wanted to try for a long time: Gradle builds have a very well-defined lifecycle. Android CI builds are not long-lived services. They are ephemeral workloads with recognizable phases: startup, rising memory pressure, heavy execution, and then termination. Even if the ex