Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only enable check plugins if air.check.skip-* is false #293

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

nineinchnick
Copy link
Contributor

Enable check plugins only when matching air.check.skip-* properties are false. This is supposed to avoid any unnecessary initialization overhead. Another minor improvement is that Maven output is not polluted with unused plugins.

I noticed #69 and I've seen similar issues when disabling the dependency plugin so this is the only check plugin that's skipped using configuration.

Tested roughly (only 3 runs of every goal) by running the following goals in the Trino project, on an otherwise idle r5.large instance:

  • clean
  • clean install
  • install - doesn't require warm-up since it's run after clean install

To make tests quicker, I skip the 3 largest modules, this still leaves out 76 modules to be built.

flags='--strict-checksums -V -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.source.skip=true -Dmaven.javadoc.skip=true -Dair.check.skip-all -pl "!:trino-server,!:trino-server-rpm,!docs"'
hyperfine --min-runs 3 "./mvnw clean $flags" "./mvnw install $flags" "./mvnw clean install $flags"

Baseline (Trino master - f7226865e8578339b4e56658b5ec116b872a59c6) yields:

Benchmark 1: ./mvnw clean --strict-checksums -V -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.source.skip=true -Dmaven.javadoc.skip=true -Dair.check.skip-all -pl "!:trino-server,!:trino-server-rpm,!docs"
  Time (mean ± σ):      4.660 s ±  0.807 s    [User: 8.118 s, System: 0.627 s]
  Range (min … max):    4.112 s …  5.587 s    3 runs
 
Benchmark 2: ./mvnw clean install --strict-checksums -V -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.source.skip=true -Dmaven.javadoc.skip=true -Dair.check.skip-all -pl "!:trino-server,!:trino-server-rpm,!docs"
  Time (mean ± σ):     231.206 s ±  0.780 s    [User: 335.105 s, System: 15.552 s]
  Range (min … max):   230.722 s … 232.106 s    3 runs
 
Benchmark 3: ./mvnw install --strict-checksums -V -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.source.skip=true -Dmaven.javadoc.skip=true -Dair.check.skip-all -pl "!:trino-server,!:trino-server-rpm,!docs"
  Time (mean ± σ):     172.580 s ±  0.755 s    [User: 206.465 s, System: 12.195 s]
  Range (min … max):   171.715 s … 173.102 s    3 runs

After changes - setting airbase to 120-SNAPSHOT in root pom.xml:

Benchmark 1: ./mvnw clean --strict-checksums -V -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.source.skip=true -Dmaven.javadoc.skip=true -Dair.check.skip-all -pl "!:trino-server,!:trino-server-rpm,!docs"
  Time (mean ± σ):      4.829 s ±  0.493 s    [User: 8.295 s, System: 0.725 s]
  Range (min … max):    4.430 s …  5.379 s    3 runs
 
Benchmark 2: ./mvnw clean install --strict-checksums -V -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.source.skip=true -Dmaven.javadoc.skip=true -Dair.check.skip-all -pl "!:trino-server,!:trino-server-rpm,!docs"
  Time (mean ± σ):     228.048 s ±  0.667 s    [User: 324.894 s, System: 15.999 s]
  Range (min … max):   227.287 s … 228.532 s    3 runs
 
Benchmark 3: ./mvnw install --strict-checksums -V -DskipTests -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.source.skip=true -Dmaven.javadoc.skip=true -Dair.check.skip-all -pl "!:trino-server,!:trino-server-rpm,!docs"
  Time (mean ± σ):     169.230 s ±  1.135 s    [User: 202.097 s, System: 12.201 s]
  Range (min … max):   168.043 s … 170.306 s    3 runs

The gain is small (3s, ~1%) but visible.

I'm also attaching flame graphs from the async-profiler, that shows a 2% difference in how much time (samples) is used for the GC and JIT.
mvn-profiles.zip

@electrum
Copy link
Member

electrum commented Feb 8, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants