Quarkus Gradle plugin 2.1.0.Final configuration time is slow
See original GitHub issueDescribe the bug
I am upgrading our project from Quarkus 1.3.x to 2.x.x. I saw that 2.1.0.Final is on Gradle plugin portal so I tried it out, even though I know 2.1.0.Final is not released yet. I found out that 2.1.0.Final increases gradle configuration time substantially. Even gradle help now takes cca. 8s. Quarkus Gradle plugin 2.0.3.Final works ok.
It seems that problem is, that dependencies are resolved in configuration time (so in plugin.apply()) and not at execution time of the plugin as before. Since Gradle does not parallelise configuration time that well that can result in longer task startup times on multi-module projects. So every start of Gradle task is slow and can take multiple seconds even if it’s not related to Quarkus plugin: imagine debugging unit tests where every test task start takes additional 8+ seconds.
We have project with 23 modules which is not that much and from gradle scan it can be seen that configuration phase for Quarkus takes 8 seconds.
Screenshot from gradle help --scan
:
Expected behavior
Quarkus Gradle plugin configures in sub second
Actual behavior
Quarkus Gradle plugin takes long time to configure
How to Reproduce?
Steps:
- Run gradle help multiple times -> it takes cca. 5s everytime
- Change version of Quarkus plugin to 2.0.3.Final in settings.gradle
- Run gradle help multiple times -> it takes 1s (it takes more on first run)
Output of uname -a
or ver
MacBook-Pro 19.6.0
Output of java -version
openjdk version “11.0.11” 2021-04-20
GraalVM version (if different from Java)
/
Quarkus version or git rev
2.1.0.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
Gradle 7.1.1
Additional information
I know 2.1.0.Final is not released yet, but it might be good to know. Feel free to close it, if it is a known issue.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (9 by maintainers)
Using Quarkus 2.2.3.CR1 solves the problem for me. The time spend in configuration is now only 1sec. The task
quarkusGenerateCode
takes some time, but it is only run for dependent task and works with the up-to-date check. Thanks for the fix 👍Great! Thanks for the feedback everyone! And @glefloch for fixing it! We’ll keep looking into improving build performance in the upcoming releases.