principle-performance

Review hot-path endpoint designs for latency, scalability, and N+1 query risks.

2|8|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/lugassawan/swe-workbench --skill principle-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: principle-performance
Source: https://github.com/lugassawan/swe-workbench/tree/main/skills/principle-performance
Command: npx skills add https://github.com/lugassawan/swe-workbench --skill principle-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents performance regressions by teaching how to choose the right design decisions (algorithms, data structures, access patterns) before you write code or change implementations.

Core Features & Use Cases

  • Latency vs. Throughput trade-offs: Decide the actual optimization objective (including tail latency) instead of improving the wrong metric.
  • Profile-before-optimize discipline: Ensure changes target real bottlenecks with measurable before/after validation.
  • Hot-path performance thinking: Catch common causes of slowdowns such as O(n²) patterns, excessive allocations/GC pressure, poor data locality, and N+1 database queries.

Quick Start

Ask an AI to review a suspected hot-path endpoint design and point out likely latency/throughput issues, N+1 query risks, and allocation-heavy patterns to prioritize what to measure and change first.

Frequently Asked Questions about principle-performance

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

FAQPage Schema
How do I prevent N+1 query patterns and latency spikes in hot-path endpoints?

To prevent N+1 queries and latency spikes, review hot endpoint designs to catch data structure choices and database boundary checks before coding, enforcing profile-before-optimize discipline with measurable before/after validation.

What is the best way to reduce GC pressure and improve data locality in application code?

Reducing GC pressure and improving data locality requires analyzing hot-path code for excessive allocations and O(n²) patterns, prioritizing measurable profile results to target real bottlenecks rather than guessing.

How do I decide between optimizing for latency or throughput when reviewing performance?

Deciding between latency and throughput optimization involves evaluating tail latency requirements against actual optimization objectives, ensuring performance engineering targets the correct metric rather than improving the wrong one.

Why does my performance optimization not improve overall application scalability?

Performance optimization often fails to improve scalability when changes target non-bottlenecks, which is why profile-before-optimize validation and Big-O risk detection on hot paths are required before altering implementations.

When do I need performance engineering for batching or streaming pipelines?

Performance engineering for batching or streaming pipelines is needed when designing data processing flows, applying data locality considerations and allocation checks to prevent design-time scalability regressions.