Skill: Performance Optimization
Systematic approach to identifying and eliminating performance bottlenecks through profiling, benchmarking, and data-driven optimization.
Process
- Establish Baselines — Measure current performance (latency, throughput, memory, CPU)
- Profile — Identify where time/resources are spent (flame graphs, traces, logs)
- Find Bottlenecks — Rank by impact (80/20 rule: fix the top bottlenecks first)
- Optimize — Apply targeted fixes (algorithm, caching, parallelization, resource allocation)
- Verify — Re-measure to confirm improvements
- Prevent Regressions — Add performance tests, monitoring, budgets
Key Metrics
- Latency: p50, p95, p99 response time
- Throughput: Requests per second, transactions per minute
- Resource Usage: CPU %, memory consumption, disk I/O
- Cost: Infrastructure cost per unit work
Common Bottlenecks
- Inefficient algorithms (O(n²) instead of O(n log n))
- Missing indexes on database queries
- Synchronous operations that should be async
- Excessive logging or serialization
- Memory leaks or inefficient data structures
- Network calls without batching/caching
- Single-threaded workloads that could parallelize
Optimization Strategies
- Algorithmic: Better algorithm selection
- Caching: Reduce computation, add layer caching
- Async: Non-blocking operations, parallelization
- Resource Allocation: CPU, memory, connections tuning
- Infrastructure: Scaling, CDN, geographic distribution
- Monitoring: Real-time alerting on perf regressions
Status: Ready for profiling, optimization, and performance tuning
Best for: Latency reduction, throughput improvement, resource efficiency
1---2name: skill-performance-optimization3description: Profile systems, identify bottlenecks, optimize code and infrastructure for speed, throughput, and resource efficiency.4---56# Skill: Performance Optimization78Systematic approach to identifying and eliminating performance bottlenecks through profiling, benchmarking, and data-driven optimization.910## Process11121. **Establish Baselines** — Measure current performance (latency, throughput, memory, CPU)132. **Profile** — Identify where time/resources are spent (flame graphs, traces, logs)143. **Find Bottlenecks** — Rank by impact (80/20 rule: fix the top bottlenecks first)154. **Optimize** — Apply targeted fixes (algorithm, caching, parallelization, resource allocation)165. **Verify** — Re-measure to confirm improvements176. **Prevent Regressions** — Add performance tests, monitoring, budgets1819## Key Metrics2021- **Latency**: p50, p95, p99 response time22- **Throughput**: Requests per second, transactions per minute23- **Resource Usage**: CPU %, memory consumption, disk I/O24- **Cost**: Infrastructure cost per unit work2526## Common Bottlenecks2728- Inefficient algorithms (O(n²) instead of O(n log n))29- Missing indexes on database queries30- Synchronous operations that should be async31- Excessive logging or serialization32- Memory leaks or inefficient data structures33- Network calls without batching/caching34- Single-threaded workloads that could parallelize3536## Optimization Strategies37381. **Algorithmic**: Better algorithm selection392. **Caching**: Reduce computation, add layer caching403. **Async**: Non-blocking operations, parallelization414. **Resource Allocation**: CPU, memory, connections tuning425. **Infrastructure**: Scaling, CDN, geographic distribution436. **Monitoring**: Real-time alerting on perf regressions4445---4647**Status**: Ready for profiling, optimization, and performance tuning48**Best for**: Latency reduction, throughput improvement, resource efficiency