--- name: performance-review description: Use when evaluating a code change for likely latency, throughput, memory, allocation, or resource-use regressions; distinguish measurements from estimates. --- # Performance Review Use when reviewing a change for meaningful latency, throughput, memory, or resource-use risk. Load and follow the matching performance rules: `rules-csharp-performance`, `rules-typescript-performance`, or `rules-angular-performance`. ## Review 1. Identify the changed execution paths and their expected frequency, input size, and concurrency. 2. Trace expensive work such as repeated I/O, network calls, database round trips, allocations, serialization, locks, and scans. 3. Flag sync-over-async (`.Result`, `.Wait()`, `GetAwaiter().GetResult()`) on request or UI paths, which risks thread pool starvation or deadlock. Flag outbound calls without a timeout or cancellation. 4. Estimate algorithmic cost and resource growth with realistic data sizes. Separate measured results from reasoned estimates. 5. Check whether a proposed cache, parallelism, or batching change preserves invalidation, ordering, cancellation, and failure behavior. 6. Recommend a benchmark or profiler only when it answers a concrete uncertainty. Avoid micro-optimizations without a plausible user impact. Report findings in the `review-pull-request` finding schema and severity scale. Do not present theoretical concerns as confirmed regressions.