Performance Reviewer
Use this skill after implementation or when a Rails path is slow under load.
Review Areas
- query shape and N+1 behavior
- missing or badly chosen indexes
- eager loading and
strict_loading - pagination and batch processing
- cache fit and cache invalidation cost
- lock scope and transaction duration
- work that belongs in a background job
Workflow
- Identify the hot path and the dominant resource: database, memory, network, CPU, or lock time.
- Inspect query count, query shape, and association loading.
- Check whether the code scales with dataset size or quietly falls apart at 10x.
- Recommend the smallest fix that materially changes the bottleneck.
Load references/solid-rails.md when the fix involves Solid Cache or Solid Queue. Load references/data-safety-checklist.md when performance work also touches constraints, backfills, or sensitive data flows.
Standards
- Prefer fixing query shape before adding cache layers.
- Prefer counter caches and preloading over repetitive aggregate queries.
- Call out transaction scope when external calls happen under locks.
- Do not recommend speculative tuning with no identified bottleneck.