hohwille opened a new issue, #867:
URL: https://github.com/apache/maven-mvnd/issues/867

   First of all, thanks for making mvnd. I read about your concepts with daemon 
and GraalVM native image and it makes fully sense to me. Being enthusiastic 
about what you have written regarding incremental builds with concepts from 
gradle, avoiding overhead, faster, ... I tried it on a large modulithic 
project. The results say that `mvnd` is slower than `mvn` so is it still in a 
development phase that is not yet ready to reveal the promised benefits? Please 
note that I was waiting for the results and not doing other computations while 
the builds have been running (what was really hard looking at the build times).
   
   Regular build with maven (3.8.6):
   ```
   mvn install -DskipTests=true -T 8
   
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  12:56 min (Wall Clock)
   [INFO] Finished at: 2023-07-03T17:59:22+02:00
   [INFO] 
------------------------------------------------------------------------
   ```
   
   Build again with mvnd from the exact same folder with no change at all:
   ```
   mvnd install -DskipTests=true -Dmvnd.keepAlive=10000ms
   
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  55:46 min (Wall Clock)
   [INFO] Finished at: 2023-07-03T18:59:48+02:00
   [INFO] 
------------------------------------------------------------------------
   ```
   To be frank, this is a disaster. 
   Actually if nothing is changed at all actually my big dream would be that 
one fine day the build tool would just check that compiled class files are 
newer than source java files, JAR file is newer than latest class file, etc. 
and nothing else needs to be done. 
   So on my machine with Core i7 (8 cores with hyperthreading), 32 GB RAM, 1TB 
SSD, I would expect a build time of 1-2 minutes.
   
   As I also developed some things for Maven and Mojo, I am fully aware that it 
is not so simple - but it would be possible with some limitations (e.g. you 
could switch between incremental and full build via args and if e.g. filtering 
properties changed externally you simply get wrong results with incremental 
build). However, according to what you are telling in your README, it seems you 
need some rework. Is your communication overhead between agent and daemon 
eating all the other benefits? Or is JIT in my specific maven project so much 
better than AOT? As you are embedding maven 4 and I compared with maven 3 - is 
there a performance disaster actually in maven4?
   
   Unfortunately this project I tested is closed source so you cannot reproduce 
and I can not share details (except things like that it has 539 modules). 
However, I will repeat this with a big OSS project so you can investigate 
better:
   
   https://github.com/m-m-m/mmm (multi-repo-build, I you want a fully automated 
setup with devonfw-ide please let me know or if you just want a bash script 
cloning all the modules in one folder I can also write this).
   
   With maven (3.9.0) single-threaded:
   ```
   mvn install -DskipTests=true
   
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  37.652 s
   [INFO] Finished at: 2023-07-03T19:06:49+02:00
   [INFO] 
------------------------------------------------------------------------
   ```
   
   And parallel maven:
   ```
   mvn install -DskipTests=true -T 8
   
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  19.532 s (Wall Clock)
   [INFO] Finished at: 2023-07-03T19:09:27+02:00
   [INFO] 
------------------------------------------------------------------------
   ```
   
   And with mvnd:
   ```
   mvnd install -DskipTests=true
   
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  01:17 min (Wall Clock)
   [INFO] Finished at: 2023-07-03T19:20:59+02:00
   [INFO] 
------------------------------------------------------------------------
   ```
   This time only 131 modules. However, the result stays the same: `mvnd` is 
4-6 times slower than vanilla `mvn`.
   So I would consider it as PoC or WIP state far from being ready to bring 
actual value to build speed.
   If you want me to do more tests or share more details please let me know.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to