How do I check performance?
Understand the concept
A performance review checks whether the amount of work stays reasonable as input size and traffic increase. Database calls, large allocations and synchronous CPU work can be more important than small syntax choices. Use measurements for suspected hotspots rather than adding optimizations everywhere.
Important ideas
-
Look for queries in loops, unbounded lists and CPU-heavy synchronous work.
-
Inspect generated SQL, query plans and selected fields.
-
Measure before adding caching or memoization.
-
Estimate query count for one request with 100 items and consider whether every selected field is actually used.
Can you explain it without the notes?
How do I check performance?
Use your own words. Explain an example and one limitation before checking the explanation.
Check your explanation
A performance review checks whether the amount of work stays reasonable as input size and traffic increase. Database calls, large allocations and synchronous CPU work can be more important than small syntax choices. Use measurements for suspected hotspots rather than adding optimizations everywhere.
Turn this concept into a clear answer.
- Explain how the cost grows and which resource becomes constrained, then propose a measurable fix.
Adapted from 11_AI_CODE_REVIEW.md · “How do I check performance?”. Examples are study fragments; framework behavior can depend on your version.