Card 04/ 06
All 6 cards
ConceptDifficulty: Advanced1 min
Measure Before You Optimize
"The API feels slow" names a symptom, not a cause — and the cause could be any of the last three topics' worth of things: an N+1 pattern, a missing cache, a slow external call, or something else entirely.
The discipline that actually finds it: measure, identify, optimize, repeat. Look at real request timing, database query logs, and whatever monitoring is already in place before touching any code. A method rewritten because it looked like the suspect is a coin flip; a method rewritten because a query log showed it running twenty-one times per request is a fix.
This is also the reason lack of monitoring is itself a performance problem, not just an operational nicety — without query timing and request-level metrics already in place, "measure first" has nothing to measure with, and every investigation starts from a guess.
- Spring Boot
- Performance