From 6618db234d37f9920ae08f253307ddfc9553dddd Mon Sep 17 00:00:00 2001 From: Andrey Belonogov Date: Mon, 17 Aug 2026 14:13:43 -0700 Subject: [PATCH] chore: size the forked test JVM heap org.gradle.jvmargs sizes the Gradle daemon, not the JVM forked for tests, which Gradle leaves at its 512m default. The unit test suite runs right against that ceiling: measured over a full run of the SDK module, 1048 of 5788 GC events were full collections, against a steady live set of ~158m. At 2g the same run does 242 full collections out of 2493. Co-authored-by: Cursor --- build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.gradle b/build.gradle index 057f8bcb..2cd05148 100644 --- a/build.gradle +++ b/build.gradle @@ -77,5 +77,8 @@ subprojects { subproject -> tasks.withType(Test).configureEach { // Allow EasyMock/CGLIB to use reflection on Java base classes when running on newer JDKs. jvmArgs += ["--add-opens", "java.base/java.lang=ALL-UNNAMED"] + // org.gradle.jvmargs sizes the daemon, not the forked test JVM, which Gradle otherwise + // leaves at 512m. The suite runs against that ceiling, spending most of its GC time there. + maxHeapSize = "2g" } }