Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Compilation time is very slow.

11 views
Skip to first unread message

Maksym Hryhoriev

unread,
Feb 6, 2025, 10:15:07 PMFeb 6
to Checker Framework discussion
I have simple Reactive SpringBoot application with OpenSearch integration:

JDK: 23.0.1
Maven: 3.9.9
Lombok: 1.18.36
SpringBoot: 3.4.2
Checker: 3.49.0 (tried previous versions too)

There are just 35 source files and raw compilation takes 1.5 sec.

But when I add checker then the compilation time is 3 min - 100x more :(

My maven plugin config:


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.version}</release>
<fork>true</fork>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.checkerframework</groupId>
<artifactId>checker</artifactId>
<version>${checker-framework.version}</version>
</path>
<path>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>${spring-boot.version}</version>
</path>
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>
lombok.launch.AnnotationProcessorHider$AnnotationProcessor
</annotationProcessor>
<annotationProcessor>
org.checkerframework.checker.nullness.NullnessChecker
</annotationProcessor>
<annotationProcessor>
org.springframework.boot.configurationprocessor.ConfigurationMetadataAnnotationProcessor
</annotationProcessor>
</annotationProcessors>
<compilerArgs combine.children="append">
<arg>--enable-preview</arg>
<arg>-Werror</arg>
<arg>-AskipUses="^.*Test.*"</arg>
<arg>-AskipDefs="^.*Test.*"</arg>
<arg>-AonlyUses=com\.myproject\.search.*</arg>
<arg>-AonlyDefs=com\.myproject\.search.*</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>

I saw that checker can add 2-10x times to compilation but not 100x :(
When I remove the checker annotation processor, the compilation time returns to 1.5-2 secs.
Is there anything I can do to optimize it?

Thanks
Reply all
Reply to author
Forward
0 new messages