From 0753f48a806dc9184b82b3fdaa3e63e9b901724c Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Tue, 15 Nov 2022 19:08:43 -0500 Subject: [PATCH] Revert "speed up javac and error-prone tasks by using less resources (#11927)" This reverts commit deab6991883eb6a930b1d98c9d90817b4441520d. Having a shitty day: git lost changes :( --- build.gradle | 2 +- gradle/generation/local-settings.gradle | 2 +- gradle/hacks/turbocharge-jvm-opts.gradle | 12 ++---------- gradle/testing/defaults-tests.gradle | 2 +- help/localSettings.txt | 2 +- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index eb2cc45f62c..a225d50366c 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ plugins { id "org.owasp.dependencycheck" version "7.2.0" id 'de.thetaphi.forbiddenapis' version '3.4' apply false id "de.undercouch.download" version "5.2.0" apply false - id "net.ltgt.errorprone" version "3.0.1" apply false + id "net.ltgt.errorprone" version "2.0.2" apply false id 'com.diffplug.spotless' version "6.5.2" apply false id 'org.barfuin.gradle.jacocolog' version "3.0.0-RC2" apply false } diff --git a/gradle/generation/local-settings.gradle b/gradle/generation/local-settings.gradle index 51c72eacf6b..cfb982a5708 100644 --- a/gradle/generation/local-settings.gradle +++ b/gradle/generation/local-settings.gradle @@ -68,7 +68,7 @@ systemProp.file.encoding=UTF-8 # The heap seems huge but gradle runs out of memory on lower values (don't know why). # # We also open up internal compiler modules for spotless/ google java format. -org.gradle.jvmargs=-Xmx3g -XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1 \\ +org.gradle.jvmargs=-Xmx3g \\ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \\ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \\ --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \\ diff --git a/gradle/hacks/turbocharge-jvm-opts.gradle b/gradle/hacks/turbocharge-jvm-opts.gradle index 3ffe0456635..5682dc17ad1 100644 --- a/gradle/hacks/turbocharge-jvm-opts.gradle +++ b/gradle/hacks/turbocharge-jvm-opts.gradle @@ -19,8 +19,7 @@ allprojects { def vmOpts = [ '-XX:+UseParallelGC', - '-XX:TieredStopAtLevel=1', - '-XX:ActiveProcessorCount=1' + '-XX:TieredStopAtLevel=1' ] // Inject vm options into custom javadoc rendering. We can't refer @@ -39,11 +38,4 @@ allprojects { jvmArgs += vmOpts } - - // Tweak javac to not be too resource-hungry. - // This applies to any JVM when javac runs forked (e.g. error-prone) - // Avoiding the fork entirely is best. - tasks.withType(JavaCompile) { JavaCompile task -> - task.options.forkOptions.jvmArgs += vmOpts - } -} +} \ No newline at end of file diff --git a/gradle/testing/defaults-tests.gradle b/gradle/testing/defaults-tests.gradle index 6324800e213..187e5d272c4 100644 --- a/gradle/testing/defaults-tests.gradle +++ b/gradle/testing/defaults-tests.gradle @@ -47,7 +47,7 @@ allprojects { description: "Number of forked test JVMs"], [propName: 'tests.haltonfailure', value: true, description: "Halt processing on test failure."], [propName: 'tests.jvmargs', - value: { -> propertyOrEnvOrDefault("tests.jvmargs", "TEST_JVM_ARGS", "-XX:TieredStopAtLevel=1 -XX:+UseParallelGC -XX:ActiveProcessorCount=1") }, + value: { -> propertyOrEnvOrDefault("tests.jvmargs", "TEST_JVM_ARGS", "-XX:TieredStopAtLevel=1") }, description: "Arguments passed to each forked JVM."], // Other settings. [propName: 'tests.neverUpToDate', value: true, diff --git a/help/localSettings.txt b/help/localSettings.txt index 4187aded8c6..6772c31077b 100644 --- a/help/localSettings.txt +++ b/help/localSettings.txt @@ -47,7 +47,7 @@ separately from the gradle workers, for example: tests.jvms=3 tests.heapsize=512m tests.minheapsize=512m -tests.jvmargs=-XX:+UseParallelGC -XX:TieredStopAtLevel=1 -XX:ActiveProcessorCount=1 +tests.jvmargs=-XX:+UseParallelGC -XX:TieredStopAtLevel=1 Gradle Daemon -------------