Alexander Obregon's Substack

Share this post

User's avatar
Alexander Obregon's Substack
That One Lazy Bean I Didn’t Know About in Spring Boot
Copy link
Facebook
Email
Notes
More
Behind the Scenes

That One Lazy Bean I Didn’t Know About in Spring Boot

It Didn’t Crash, It Just Waited

Alexander Obregon's avatar
Alexander Obregon
May 02, 2025
∙ Paid
1

Share this post

User's avatar
Alexander Obregon's Substack
That One Lazy Bean I Didn’t Know About in Spring Boot
Copy link
Facebook
Email
Notes
More
Share

This wasn’t me trying to shave milliseconds off cold start times. This was a while back, and I was still pretty new to Spring. I opened the logs out of curiosity and noticed the launch felt slower than I remembered. Nothing crashed, no red text in sight, but the browser spinner kept going long after Spring said the context was “ready.” I figured it was just one of those random build hiccups. But it kept happening.

The Delay Hid in Plain Sight

Logs looked clean. Actuator’s /health came back fine. The landing page loaded. But a few endpoints took three or four seconds to respond the first time I hit them. The delay pointed straight to one class: ExpensiveService.

Keep reading with a 7-day free trial

Subscribe to Alexander Obregon's Substack to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Alexander Obregon
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More