Skip to main content

performance

Performance analysis and optimisation: SLOs and per-stage budgets, tracing and profiling, algorithmic complexity, database queries (N+1, plans, indexes, pooling), concurrency and blocking I/O, memory and leaks, caching and invalidation, rate limits, backpressure and overload, LLM latency and token cost, load tests. Use for finding bottlenecks, speeding up slow pages, queries or code, scalability assessments, and implementing optimisations.

소스 정보

저장소
Albadit/DnnManager.NET
최근 소스 활동
2026년 10월 8일 07:12
감지된 SKILL.md 언어
영어
스타
1
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
3 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
performance
description
Performance analysis and optimisation: SLOs and per-stage budgets, tracing and profiling, algorithmic complexity, database queries (N+1, plans, indexes, pooling), concurrency and blocking I/O, memory and leaks, caching and invalidation, rate limits, backpressure and overload, LLM latency and token cost, load tests. Use for finding bottlenecks, speeding up slow pages, queries or code, scalability assessments, and implementing optimisations.
# Performance Find bottlenecks, recommend and implement optimisations, and keep resource use efficient. Treat performance as a system property defined by explicit SLOs, measured with distributed tracing and profiling, and validated with load tests and quality evals. Never optimise without measuring first. ## Mode This skill both analyses and implements. Analyse and report by default. When the request is to build, fix or change something, or carries `#fix`, also make the changes: fix Critical and High findings directly and list Medium and Low ones in the report. ## What to cover - Define and enforce **performance budgets** per request stage - Identify **algorithmic complexity** issues (time and space) - Detect **memory leaks** and excessive allocations via profiling - Find **I/O bottlenecks** (database, network, disk, model calls, retrieval) - Analyse **caching strategies**, invalidation patterns, and hit rates - Assess **concurrency** and parallelism opportunities - Analyze **database query performance** (N+1 queries, missing indexes, bad plans) - Analyse **resource pooling** (connections, threads, connection storms) - Evaluate **lazy loading** vs eager loading trade-offs - Analyse **model-call latency** and token economics (input tokens, output tokens, prompt caching) - Assess **streaming** performance (TTFT, TTLB, partial rendering) - Evaluate **retry, rate-limit, and backpressure** strategies - Analyse **overload behavior** (load shedding, circuit breaking, admission control) - Validate performance with **load tests + quality evals** as a regression harness ## Workflow Work through these stages. The questions and checks for each are in [reference/analysis-stages.md](reference/analysis-stages.md): read all of it for a full-scope review, or only the stages that match a focused scope. ## Reference | File | Contents | Read | |---|---|---| | [reference/analysis-stages.md](reference/analysis-stages.md) | The analysis stages in full | Before analysing: all of it for a full-scope review, only the matching stages for a focused one | | [reference/metrics-and-red-flags.md](reference/metrics-and-red-flags.md) | Latency, throughput, cost and quality metrics and stage budgets; red-flag table with impact and solution | Before Stage 1 (defining what "fast enough" means) and when classifying an issue | ## Output Format For each finding, provide ALL of these fields: ``` ### [SEVERITY] Performance Issue - **Location**: File and line reference (or system component) - **Type**: CPU / Memory / I/O / Network / Cost / Quality - **Current Complexity**: O(n²) etc. (or "unknown - needs profiling") - **Impact**: Measured or estimated impact on latency/throughput/cost (cite percentile) - **Optimization**: Specific recommendation with implementation approach - **Expected Improvement**: Estimated gain (with evidence basis - measured, benchmarked, or industry-typical) - **Trade-offs**: What you give up (complexity, memory, correctness risk, etc.) - **Verification**: How to confirm the optimization worked (specific metric, benchmark, or eval) ``` After all findings, ALWAYS provide these sections: 1. **Performance budget breakdown** - per-stage latency allocation and which stages are over-budget 2. **Optimization priority** - ordered by expected impact per engineering effort (highest-ROI first) 3. **Missing observability** - what instrumentation/profiling/tracing is missing 4. **Benchmark plan** - specific load tests, soak tests, and evals to run 5. **Quality guard** - which evals/tests must pass to validate optimizations didn't regress correctness ## Guidelines - **Always measure before optimizing** - avoid premature optimization; identify the real bottleneck first - Consider the **realistic data scale**, not just worst case or best case - **Prefer algorithmic improvements over micro-optimizations** - O(n²) → O(n log n) beats any cache trick - Account for caching at every layer (CPU, application, CDN, provider prompt cache) - Consider the **cost of added complexity** vs performance gain - don't add complexity for 2% improvement - **Recommend specific profiling tools** for the language/runtime in use - Track **tail latency (p95/p99)** as the primary performance indicator - averages lie - Always validate optimizations with **benchmarks AND quality evals** - "faster but wrong" is not an improvement - Treat **retry and rate-limit behavior** (including SDK defaults) as part of the performance scope - For AI workloads: **token count is money and latency** - always analyze input/output token usage - Flag **retry storms** explicitly whenever retries exist at multiple layers - For streaming workloads: TTFT is a separate SLO from TTLB - optimize both - Never recommend caching without specifying the **invalidation strategy** - **Overload protection is a performance feature** - load shedding and circuit breaking prevent cascading failure - Include **memory leak detection** in soak test recommendations - leaks are performance regressions - Connection pooling should be verified for correctness (pooling mode vs transaction semantics) - Document performance-critical code with complexity notes and SLO context ## Follow-ups After the report, offer these next steps in one line each; do not start them unprompted: - Implement the optimisations recommended in the report. - Analyse the architectural implications with the `architecture` skill.
GitHub에서 보기