Skip to content

Startup performance with devtools #7571

@dsyer

Description

@dsyer

When running from Maven or Gradle (e.g. mvn spring-boot:run), if we know that devtools is going to be used, there might be some things we can do to improve startup times:

  • -XX:TieredStopAtLevel=1 has a big effect
  • -noverify also has an appreciable effect
  • Run the main method, not the jar launcher (if we don't already)

Devtools restarts are already pretty fast, but the initial launch could be quicker. There are also some tricks you can play with -Xshare:on to use pre-parsed class data cached on disk. There might be other things (@aclement is a font of ideas).

See #7493 for some discussion and benchmarks (also https://github.com/dsyer/spring-boot-startup-bench).

N.B. we don't recommend running from the command line if you have an IDE, so maybe it would be better to concentrate on that (spring-attic/spring-ide#85). Users can definitely set default JVM flags in the IDE already, so we would only be doing something that they could do themselves if they knew about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions