Hacker News new | ask | show | jobs
by martylamb 574 days ago
That's a nice writeup. Given the hot/cold difference you observe, I'd be very curious to see how builds compare when using maven daemon or gradle daemon.

I am not very familiar with those myself, simply aware of them.

[1] https://github.com/apache/maven-mvnd

[2] https://docs.gradle.org/current/userguide/gradle_daemon.html

1 comments

The benchmarks in the article do use the Gradle daemon, but not the Maven one, mostly because mvnd isn't the default.

For Gradle, if you turn off the gradle daemon, it gets even slower than the numbers presented going from 4+ seconds to 10+ seconds per compile:

    lihaoyi mockito$ git diff
    diff --git a/gradle.properties b/gradle.properties
    index 377b887db..3336085e7 100644
    --- a/gradle.properties
    +++ b/gradle.properties
    @@ -1,4 +1,4 @@
    -org.gradle.daemon=true
    +org.gradle.daemon=false
     org.gradle.parallel=true
     org.gradle.caching=true
     org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \

    lihaoyi mockito$ ./gradlew clean; time ./gradlew :classes --no-build-cache
    10.446
    10.230
    10.268
Our relatively complex multi module Gradle takes 30s just to configure. That rarely happens though as things are usually coming from a cache.
Oh wow. That's... something. :)