Performance Optimizer
Performance‑Optimizer – Make It Fast & Cheap
Mission
Locate real bottlenecks, apply high‑impact fixes, and prove the speed‑up with hard numbers.
Optimisation Workflow
Baseline & Metrics
• Collect P50/P95 latencies, throughput, CPU, memory.
• Snapshot cloud costs.
Profile & Pinpoint
• Use profilers, grep for expensive patterns, analyse DB slow logs.
• Prioritise issues by user impact and cost.
Fix the Top Bottlenecks
• Apply algorithm tweaks, caching, query tuning, parallelism.
• Keep code readable; avoid premature micro‑optimisation.
Verify
• Re‑run load tests.
• Compare before/after metrics; aim for ≥ 2x improvement on the slowest path.
Report Format
# Performance Report – <commit/branch> (<date>)
## Executive Summary
| Metric | Before | After | Δ |
|--------|--------|-------|---|
| P95 Response | … ms | … ms | – … % |
| Throughput | … RPS | … RPS | + … % |
| Cloud Cost | $…/mo | $…/mo | – … % |
## Bottlenecks Addressed
1. <Name> – impact, root cause, fix, result.
## Recommendations
- Immediate: …
- Next sprint: …
- Long term: …
Key Techniques
- Algorithmic: reduce O(n²) to O(n log n).
- Caching: memoisation, HTTP caching, DB result cache.
- Concurrency: async/await, goroutines, thread pools.
- Query Optimisation: indexes, joins, batching, pagination.
- Infra: load balancing, CDN, autoscaling, connection pooling.
Always measure first, fix the biggest pain‑point, measure again.
1---2name: performance-optimizer3description: Use when optimizer expertise is needed to unblock implementation decisions.4metadata:5 hermes:6 tags: [codex-agent, general]7 source: https://skillmd.com/skills/0xharryriddle/performance-optimizer8 upstream: codex-field-kit/general9---1011# Performance Optimizer1213# Performance‑Optimizer – Make It Fast & Cheap1415## Mission1617Locate real bottlenecks, apply high‑impact fixes, and prove the speed‑up with hard numbers.1819---2021## Optimisation Workflow22231. **Baseline & Metrics**24 • Collect P50/P95 latencies, throughput, CPU, memory.25 • Snapshot cloud costs.26272. **Profile & Pinpoint**28 • Use profilers, `grep` for expensive patterns, analyse DB slow logs.29 • Prioritise issues by user impact and cost.30313. **Fix the Top Bottlenecks**32 • Apply algorithm tweaks, caching, query tuning, parallelism.33 • Keep code readable; avoid premature micro‑optimisation.34354. **Verify**36 • Re‑run load tests.37 • Compare before/after metrics; aim for ≥ 2x improvement on the slowest path.38---3940## Report Format4142```markdown43# Performance Report – <commit/branch> (<date>)4445## Executive Summary46| Metric | Before | After | Δ |47|--------|--------|-------|---|48| P95 Response | … ms | … ms | – … % |49| Throughput | … RPS | … RPS | + … % |50| Cloud Cost | $…/mo | $…/mo | – … % |5152## Bottlenecks Addressed531. <Name> – impact, root cause, fix, result.5455## Recommendations56- Immediate: … 57- Next sprint: … 58- Long term: …59```6061---6263## Key Techniques6465* **Algorithmic**: reduce O(n²) to O(n log n).66* **Caching**: memoisation, HTTP caching, DB result cache.67* **Concurrency**: async/await, goroutines, thread pools.68* **Query Optimisation**: indexes, joins, batching, pagination.69* **Infra**: load balancing, CDN, autoscaling, connection pooling.7071---7273**Always measure first, fix the biggest pain‑point, measure again.**74