-
Notifications
You must be signed in to change notification settings - Fork 763
Description
The error prone maven instructions for jdk16+1 recommend using compilerArgs
and fork
. I was able to supply those same args to maven itself via .mvn/jvm.config
file2 and get a 4x improvement of build times by no longer forking the compiler.
Anecdotally, with my sample size of 1, using a maven reactor with 80 modules the build time for mvn clean compile
was 11s using .mvn/jvm.config
and 44s when forking the compiler.
The maven-compiler-plugin docs3 leads me to believe that fork
was designed for use cases where a different JDK was wanting to be used, rather than for configuration isolation while using the default javac. Thats not to say it can't also work when config isolation is desired, like in this case.
Does errorprone need that level of isolation on the exports/opens configuration? Would the maintainers be open to updating the docs to include the .mvn/jvm.config
option with the pros/con between the two approaches? or if the config isolation is not needed and the performance impact is impactful enough, change the recommendation to the non-forking option.