5 ms·
Our Spring Boot showcase application https://github.com/porscheinformatik/angular-spring-heroes https://github.com/porscheinformatik/angular-spring-heroes start
by derkoe 5y ago
Our Spring Boot showcase application https://github.com/porscheinformatik/angular-spring-heroes https://github.com/porscheinformatik/angular-spring-heroes starts ~ 10% faster on Java 17 compared to Java 11 (compiled with target 11).
- facorreia 5y agoDo you happen to have a comparison from Java 8 to 11?
- derkoe 5y agoJust tried it - there is no significant difference between Java 8 and 11! They both start around 6.5s (JVM running for 7.4s). Java 17 starts the app in approximately 5.9s (JVM running for 6.7s).
- ge0ffrey 5y agoWe did java 8 vs java 11 a few years ago: https://www.optaplanner.org/blog/2019/01/17/HowMuchFasterIsJava11.html https://www.optaplanner.org/blog/2019/01/17/HowMuchFasterIsJ... TLDR: using the same GC (*), it's 4% to 16% faster (depending on the GC). But be warned that if you don't set a GC, Java 8 uses Parallel GC (high throughput, so faster) by default and Java 11 uses G1 GC (low latency, so less hickups) by default.
- vips7L 5y agoI hope spring moves to compile time di like quarkus and ajave inject instead of scanning the classpath at runtime.
- _old_dude_ 5y agoYou mean Spring native [1], i think it's not ready yet. [1] https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/ https://docs.spring.io/spring-native/docs/current/reference/...
- vips7L 5y agoNo I do not. I do not want native image. I want the dependency injection container created at compile time like Dagger2 [0] or Avaje Inject [1] or quarkus without native image. [0] https://dagger.dev https://dagger.dev [1] https://avaje.io/inject/ https://avaje.io/inject/
- _old_dude_ 5y agoYou can use the Spring AOT plugin [1] without enabling the support of GraalVM native image [1] https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/#_add_the_spring_aot_plugin https://docs.spring.io/spring-native/docs/current/reference/...
- vips7L 5y agoOhhh I see. Thank you!
- dlbucci 5y agoIsn't that what Micronaut does, from the creators of Spring? I never used the latter, but I really like working with the former.
- derkoe 5y agoYes, Micronaut and Quarkus do that. Micronaut was created by a company (https://objectcomputing.com/ https://objectcomputing.com/)
- derkoe 5y agoEven more interesting is the memory usage (app started and opened index page in browser): - Java 8/11 uses ~ 550MiB - Java 17 uses ~ 260MiB (all run with Docker and a memory limit of 1GiB)
- brunoborges 5y agoWhat GC is used, and how much CPU time/quota is given to the container?
- derkoe 5y agoDefault GC, and no quota - which means my full machine (i7-6700HQ)
- derkoe 5y agoJust tried a simple Quarkus app (https://github.com/derkoe/quarkus-htmx-todos https://github.com/derkoe/quarkus-htmx-todos) with the same results. Java 17 starts around 10% faster. Memory consumption is around 10% lower (after first request).