Finds and verifies .NET performance bottlenecks using workload definition, profiling, query analysis, allocation inspection, and reproducible benchmarks. Use when latency/throughput/resource usage is the goal; do not use for correctness-only review (use dotnet-code-review).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Performance Review?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/k4ndev-performance-review)
---
name: performance-review
description: Finds and verifies .NET performance bottlenecks using workload definition, profiling, query analysis, allocation inspection, and reproducible benchmarks. Use when latency/throughput/resource usage is the goal; do not use for correctness-only review (use dotnet-code-review).
---
# Performance Review
## Purpose
Improve a measured user or system performance objective without trading away correctness or maintainability based on guesswork.
## Scope
Hot paths, algorithms, allocations, I/O, database queries, serialization, caching, contention, and benchmark design.
## When to use
- User reports a latency, throughput, memory, CPU, startup, or scale problem.
- A performance change needs measurement or workload-aware design.
## Do not use for
- Correctness-only issue without a performance objective: use `dotnet-code-review` or a domain skill.
- EF query semantics/migrations alone: use `efcore-patterns`.
- Runtime evidence collection for production hang/crash: use `dotnet-diagnostics`.
## Required context
Obtain metric and target, representative input/data volume, concurrency, deployment/runtime version, baseline, environment, and reproduction steps. If missing, state what cannot be concluded.
## Workflow
1. Define the metric (e.g. p95 latency, allocations/op, CPU, queue delay) and representative workload.
2. Locate hot path with traces/profilers/counters, SQL plan, or benchmark—not intuition alone.
3. Check algorithmic complexity, repeated enumeration/materialization, query count/N+1, unbounded result/queue, blocking async, serialization, allocations, lock contention, and cache behavior.
4. Form one falsifiable bottleneck hypothesis and choose the smallest safe change.
5. Benchmark before/after with same runtime, data, environment, warmup, and concurrency; include variance and correctness checks.
6. Preserve cancellation, bounded resource use, and error semantics; remove a complexity-increasing optimization if measured benefit is insignificant.
## Decision rules
- Do not introduce `ArrayPool`, `Span<T>`, `unsafe`, custom cache, or object pooling without a profile showing the benefit and lifetime safety.
- Cache only with a defined key, expiration/invalidation, size bound, and stampede strategy.
- EF Core bottlenecks use `efcore-patterns`; report SQL/plan evidence rather than assuming LINQ shape predicts cost.
## Severity classification
For review, describe impact by measured scope and user/system threshold. Do not assign production severity based on a benchmark micro-win alone; use the repository's review taxonomy if applicable.
## Expected output format
Report metric/workload, evidence and hotspot, hypothesis, change, benchmark method/results (or explicitly not measured), trade-offs, and regression/performance tests.
## Common mistakes
- Claiming a speedup without measurements, optimizing cold code, benchmarking different workloads, removing bounds, or treating a microbenchmark as proof of end-to-end latency.
## Edge cases
- Warmup/JIT, tiered compilation, GC, noisy neighbors, and database cache state can distort results.
- Averages hide tail latency; use percentiles and realistic concurrency where the service objective requires them.
- Faster throughput can increase memory/queueing; track all constrained resources.
## Examples
See [performance examples](examples.md) for a measured query-count reduction and a benchmark caveat.
## Test scenarios
- Positive: “The list endpoint p95 regressed; use trace and SQL evidence to isolate the added N+1.”
- Negative: “Is `AsNoTracking` correct when I update entities?” routes to `efcore-patterns`.
- Boundary: EF query latency activates this skill and `efcore-patterns`; a production memory dump investigation also needs `dotnet-diagnostics`.
## Related skills
`efcore-patterns`, `dotnet-diagnostics`, `async-concurrency`, `logging-observability`, `dotnet-code-review`.