| name | performance-review |
| description | Perform focused performance reviews of code changes, pull requests, branches, or workspace diffs for algorithmic complexity, database query patterns, N+1 risks, pagination, caching, batching, memory use, synchronous I/O, latency, and load behavior. Use when Codex is asked for a performance review, scalability review, profiling plan, benchmark plan, or latency-risk assessment. |
Performance Review
Quick Start
Review Workflow
- Establish expected scale: records, requests per second, concurrency, payload size, memory budget, latency budget.
- Identify hot paths and expensive dependencies: database, network, filesystem, CPU, serialization, rendering, queues.
- Run signal scan:
python3 scripts/performance_signal_scan.py /path/to/repo-or-file
- Trace loops, queries, API calls, and allocations through realistic worst-case inputs.
- Recommend validation: targeted tests, profiling, explain plans, benchmarks, load tests, or production metrics.
Output Rules
- Findings must include scale assumptions and the cost mechanism.
- Distinguish measured issues from plausible risks.
- Prefer concrete mitigations: add pagination, batch calls, add index, cache with invalidation, stream data, avoid repeated work.
- If no findings are found, state residual risk and whether profiling or benchmarks were skipped.