spring-attic / spring-native

Spring Native is now superseded by Spring Boot 3 official native support
https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html
Apache License 2.0
2.74k stars 355 forks source link

Add support for quick build mode #1629

Closed mhalbritter closed 2 years ago

mhalbritter commented 2 years ago

Native Image 22.1 introduced the quick build mode, which can be enabled with -Ob. This mode disables some optimizations to achieve quicker build times.

mhalbritter commented 2 years ago
╰─$ ./build.sh                                                                                                                                                                                                                                                                                                       === Building commandlinerunner sample ===
Packaging commandlinerunner with Maven (native)
SUCCESS
Testing commandlinerunner
SUCCESS
Build memory: 5,82GB
Image build time: 43,0s
RSS memory: 30.3M
Image size: 26.1M
Startup time: 0.015 (JVM running for 0.02)
Lines of reflective config: 980

╰─$ ./build.sh -q
=== Building commandlinerunner sample ===
Packaging commandlinerunner with Maven (native)
SUCCESS
Testing commandlinerunner
SUCCESS
Build memory: 5,08GB
Image build time: 27,3s
RSS memory: 30.2M
Image size: 26.5M
Startup time: 0.019 (JVM running for 0.023)