performance-review

Review code diffs for hot-path complexity, allocations, and N+1 patterns.

Updated Dec 21, 2018
One-click install
npx skills add https://github.com/dhnt/dhnt --skill performance-review-dhnt
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: performance-review
Source: https://github.com/dhnt/dhnt/tree/main/catalog/md/review/performance-review
Command: npx skills add https://github.com/dhnt/dhnt --skill performance-review-dhnt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents slowdowns by guiding reviewers to identify performance regressions caused by changes in algorithms, allocations, hot-path behavior, or runtime characteristics.

Core Features & Use Cases

  • Hot-path and allocation scrutiny: Surface new allocations, resizing, and string/regex/parser work occurring inside frequently executed code paths.
  • Complexity and N+1 pattern checks: Detect changes that increase algorithmic complexity or introduce per-item DB/RPC/file operations.
  • Measurement-driven validation: Encourage benchmarking and profiling to confirm impact and avoid speculative performance claims.
  • Practical review output: Produce a structured summary, prioritized concerns, hardening opportunities, and benchmark status.

Quick Start

Ask an AI to review a PR’s diff for performance regressions and return a structured report with a summary, prioritized concerns/hardening opportunities, and benchmark/profiling recommendations.

Frequently Asked Questions about performance-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect performance regressions in a pull request before merging?▼

To detect performance regressions in a pull request, review the diff for hot-path complexity, new allocations, and N+1 patterns. This process identifies runtime risks in frequently executed logic before code ships.

What is a code performance review and what does it look for?▼

A code performance review analyzes changes in algorithms, allocations, and hot-path behavior to prevent slowdowns. It looks for resizing, string work, and per-item operations inside frequently executed code paths.

How do I identify N+1 query patterns and allocation behavior in my code diff?▼

You identify N+1 patterns and allocation behavior by reviewing your diff for per-item DB, RPC, or file operations introduced within loops. This scrutiny surfaces runtime risks in request-handling logic.

Does performance review require benchmarking before reporting concerns?▼

Performance review relies on measurement-driven validation, meaning benchmarking and profiling are required to confirm impact. It avoids speculative claims by producing targeted benchmark guidance alongside prioritized concerns.

Can I use this performance review for pre-merge gating on latency and throughput changes?▼

Yes, you can use this performance review for pre-merge gating when latency, throughput, or memory usage may have changed. It provides a structured summary distinguishing hardening opportunities from actual concerns.

What is the best way to audit algorithmic complexity in frequently executed code paths?▼

The best way to audit algorithmic complexity is reviewing code changes for hot-path behavior and runtime characteristics. This approach detects increased complexity and validates impact using profiling rather than speculation.