performance

Designs and reviews system performance using measurements, critical paths, and capacity budgets.

1|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/zhiyuan-zhang0206/Ava --skill performance-zhiyuan-zhang0206
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: performance
Source: https://github.com/zhiyuan-zhang0206/Ava/tree/main/ava_builtins/skills/ava-serious-engineering/practices/performance
Command: npx skills add https://github.com/zhiyuan-zhang0206/Ava --skill performance-zhiyuan-zhang0206

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Engineers routinely optimize the wrong code because intuition about bottlenecks is unreliable, and unbounded queries or blocking calls turn into production incidents. This Skill provides a measurement-first discipline for designing and reviewing performance before users report slowness. ## Core Features & Use Cases - Measurement-driven optimization: Requires a recorded baseline, target, and measured delta before any performance change ships. - Critical path design: Strips exception branches and special cases out of the happy path so the common request executes minimal code. - Bounded resource usage: Flags unbounded reads, synchronous work on event loops, and unbudgeted steady-state costs (rows/day, memory, tokens). - Use Case: When reviewing a new /api/metrics endpoint, apply the checklist to catch a fetchall() with no LIMIT that would materialize 230K rows per call, and replace it with a paginated cursor query. ## Quick Start Review this endpoint's query and async handler for unbounded reads, event-loop blocking, and missing latency baselines using the performance checklist.

Frequently Asked Questions about performance

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

FAQPage Schema
How do I find performance bottlenecks in my code?▼

Profile the actual system before changing anything, since intuition about bottlenecks is unreliable. Record the baseline number, the target, and the measured delta in the same PR as the change so optimization is driven by measurement.

How do I prevent unbounded database queries from exhausting memory?▼

Every read that can grow with data volume needs an explicit LIMIT, page size, cursor, or aggregation. Check call sites in code review, not just the query itself, since a fetchall() on a growing table can permanently add tens of megabytes per request.

Why does a synchronous call block an async event loop?▼

Synchronous heavy work on an async loop freezes every request queued behind it; one synchronous embedding call froze all HTTP traffic for 5-18 seconds in a real incident. Anything taking more than a few milliseconds should run on a thread pool, worker, or async-native client.

When should I optimize code performance?▼

Only after measuring. Premature optimization routinely targets the wrong layer, while profiling-driven refactors have doubled critical-path speed and reduced code size. Establish a baseline and target first, then optimize the measured bottleneck.

What is the difference between performance and concurrency review?▼

Performance asks whether the system is fast and cheap enough: throughput, latency, resource budgets, and the critical path. Concurrency asks whether it is correct under parallel execution: shared state, connection lifecycles, and backpressure. They share incidents like event-loop blocking but answer different questions.