perf-optimization

Convert CPU, heap, and trace profiling data into prioritized, low-risk code changes.

150|48|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/irahardianto/awesome-agv --skill perf-optimization-irahardianto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-optimization
Source: https://github.com/irahardianto/awesome-agv/tree/main/.agents/skills/perf-optimization
Command: npx skills add https://github.com/irahardianto/awesome-agv --skill perf-optimization-irahardianto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you turn performance complaints into measurable, safe improvements by using real profiling data instead of guesswork.

Core Features & Use Cases

  • Step-by-step profiling workflow: collect CPU/heap/trace data, analyze runtime noise, and isolate production cost from benchmark artifacts.
  • Impact/risk-driven prioritization: rank candidate fixes by impact-to-risk ratio and decide when to defer or skip micro-optimizations.
  • Verifiable optimization loop: implement one change at a time with tests-first, then benchmark before/after using the same configuration.
  • Reusable pattern catalog: caching, pre-allocation, fast-reject, pooling, batching, artifact partitioning, deduplicated concurrent fetches.
  • Safety invariants: includes explicit guardrails for security-sensitive caching/library swaps and clear anti-pattern prevention.

Quick Start

Use the perf-optimization skill to analyze and optimize the performance of the specific component described in your profiling report, then provide a ranked fix plan and the exact single-change verification/benchmark steps.

Frequently Asked Questions about perf-optimization

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

FAQPage Schema
How do I fix slow service latency using CPU and heap profiling data?

Reduce memory allocations in hot paths by applying pattern-based fixes like pre-allocation, pooling, and batching. These reusable optimization patterns target allocation reduction directly from heap trace evidence to lower garbage collection overhead.

How do I prioritize performance fixes by impact and risk?

Prioritize performance fixes by ranking candidate code changes using an impact-to-risk ratio. This approach evaluates profiling data to decide when to execute high-impact changes and when to defer or skip risky micro-optimizations entirely.

What is the best way to benchmark code changes before and after optimization?

Benchmark code changes before and after optimization by implementing one fix at a time with tests-first, then running comparisons using the exact same fixed configuration parameters and stop-when heuristics to verify measurable latency improvements.

Does performance profiling handle runtime noise and benchmark artifacts?

Performance profiling handles runtime noise and benchmark artifacts by applying specific interpretation rules for cumulative versus flat profiles and artifact partitioning. This isolates true production cost from misleading benchmark environmental data.

When should I avoid caching or library swaps for hot path optimization?

Avoid caching or library swaps for hot path optimization when explicit safety guardrails are violated, particularly in security-sensitive contexts. The workflow includes anti-pattern prevention to ensure optimizations do not introduce security vulnerabilities.