-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Update Gradle bootRun to launch JVM with flags to enable development-time optimisations #16222
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
Comments
@wilkinsona Can we get a reference to study for IDEA and Spring Tools about customising tiered compilation and the disabled verifier? |
@dosdebug You can just launch an app using their Spring Boot support and take a look at the JVM options. I'm not sure if it's documented anywhere in either case. The relevant code in Spring IDE is here. |
@wilkinsona There will definitely be a better solution but can you please see and suggest if it's the right direction or where should I focus on. https://github.com/dosdebug/spring-boot/commit/d712978571c79195ab5f0d0d396d4633848cb390 I never have tried contributing before but trying to see if I can really do it. |
Thanks for taking a look at this, @dosdebug. I'm not sure we're quite ready to implement this yet as we have some design decisions to make. For example, we need to decide when the arguments should be applied (always, when the user doesn't specify anything, always unless they've been disabled, etc). |
@wilkinsona Okay sure. No worries. But thank you for your time. |
This branch contains a proposal for the Gradle side of things. By default I originally explored an approach that would not need the Flagging for team attention to see if we have agreement on the approach. I'm also not convinced by the name of the |
@wilkinsona How about just |
Thanks for the suggestion. Disabling the verifier has no benefit once all of the classes have been loaded and tuning the JIT to stop at an earlier compilation level actually slows things down for a long-running process. In other words, the settings really only reduce the initial startup time rather than making everything quick. As such, I think |
Inspired by the terminology used in IntelliJ IDEA, we're going to go with |
@dosdebug Would you like to update your proposal for Maven based on what I have done for Gradle but with the property being called |
@wilkinsona Sure, I am going to give it a try and submit PR |
@wilkinsona Please review #16941 when you have time. |
I've retitled this issue to focus on Gradle. #16941 will take care of the Maven side of things. |
Note to fellow usersWhen you have a transitive import/dependency missing from classpath e.g. because it's not actually used at runtime, and you're wondering why:
...that's because this change added tasks.withType(org.springframework.boot.gradle.tasks.run.BootRun) {
optimizedLaunch = false
} |
Both IDEA and Spring Tools launch Boot apps during development with customised tiered compilation and the verifier disabled to reduce startup time. We should do the same with
spring-boot:run
in Maven andbootRun
in Gradle.The text was updated successfully, but these errors were encountered: