Speed up ECJ tasks by avoiding --release (#484)

LUCENE-10185 caused a large performance regression in ECJ tasks by using the --release flag.

Instead of using --release, we can just disable "terminal deprecation", and leave this check to `javac`. The --release flag makes this tool run 50% slower.
This commit is contained in:
Robert Muir 2021-11-28 15:10:32 -05:00 committed by GitHub
parent 1fb45da7bb
commit 63c89f678d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -63,7 +63,9 @@ allprojects {
args += [ "-d", "none" ] args += [ "-d", "none" ]
// Compilation environment. // Compilation environment.
args += [ "--release", project.java.targetCompatibility ] // we use -source/-target as it is significantly faster than --release
args += [ "-source", project.java.sourceCompatibility ]
args += [ "-target", project.java.targetCompatibility ]
args += [ "-encoding", "UTF-8"] args += [ "-encoding", "UTF-8"]
args += [ "-proc:none" ] args += [ "-proc:none" ]
args += [ "-nowarn" ] args += [ "-nowarn" ]

View File

@ -101,7 +101,9 @@ org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=error org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=error
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=error # Ignore terminal deprecation, allowing this tool to run faster.
# we can just let javac do this check instead!
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error