| name | perf |
| dimension | evaluation_and_reward |
| description | Performance optimizer for loops, DB queries, rendering, and batch operations. Catches N+1 queries, missing indexes, and unnecessary re-renders. |
Perf — Performance Review
Process
- Identify performance-sensitive code paths from the diff (loops, queries, rendering, batch ops)
- Run the Checklist below, marking each item as pass, fail, or N/A with reason
- For each failure, cite the file and line number with a one-line fix hint
- Report findings using the Evidence Required section
When to Trigger
- Database queries inside loops
- Large data set processing
- Rendering or UI update logic
- API endpoint that could receive high traffic
- File I/O in hot paths
Checklist
Database
Memory
Computation
Network
See references/performance.md for the full checklist.
Anti-Rationalization
| Excuse | Rebuttal | What to do instead |
|---|
| "Premature optimization is the root of all evil" | Knuth said "about 97% of the time" — the other 3% matters. N+1 queries are never premature. | Check for N+1 queries and missing indexes before merging. |
| "It works fine on my machine" | Your machine is not production. Profile under realistic conditions. | Run the perf checklist against realistic data volumes. |
| "We can optimize later" | Performance debt is invisible until it's catastrophic. Measure now. | Add a benchmark or load test for the critical path today. |
Evidence Required
Before claiming performance review is complete, show ALL applicable:
"Looks fine" is not a review. Show the query or the code path.
Red Flags
- Loading all records when only count is needed
- Synchronous file I/O in request handlers
- Missing pagination on list endpoints