How Fast is Spring
summary
Measurements show common assumptions about Spring slowness are wrong: most startup time is class loading, not autoconfiguration or reflection, and benchmarks cut a hello-web app from ~1,300ms to ~700ms (and demo PetClinic variants from ~98s to under 3s, then under 1s). Tools used: JMH, async-profiler, JMC and flame graphs. Effective fixes include classpath exclusions, lazy bean definitions, JVM flags (-noverify, reduced JIT), class-data-sharing; GraalVM native images push cold starts to ~40ms.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:34The JVM
- 5:35Start Startup Times
- 9:22Start Startup Times Graph
- 18:55How to make it go faster
- 23:11Lazy XML
- 25:23JAR
- 35:13Tools
- 38:37Demo Sample
- 40:08Data Correlation
- 42:11JVM tweaks
- 44:02Classpath exclusion
- 44:36Spring Boot features
- 47:43Pet Clinic
- 48:50Spring Function
- 50:29Constraints
- 51:46Native Images
related talks
52mLean Spring Boot Applications for the Cloud
42mTechniques for a faster JVM start-up
26mGoing Serverless With Spring’s Support for GraalVM, Project CraC & More
59mRuntime Efficiencies and Spring Boot
24mSpring: Your Next Java Micro-Framework
49mBuilding Lean Spring Boot Applications for the Cloud
53mFour Approaches to Reducing Java Startup Time
48mScotty, I need Warp Speed - Ways to improve JVM startup
