performance-tuning — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited performance-tuning (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill enforces measurement-first, evidence-based performance optimization. It makes optimizing without baselines, guessing at bottlenecks, or shipping unverified improvements structurally impossible.
| Agent Will Try To... | Why It Seems Reasonable | Why It Fails | Counter |
|---|---|---|---|
| Skip baseline measurement because "it's obviously slow" | "The program takes 45 minutes, we know it's slow" | Knowing it is slow is not knowing where it is slow. Without a baseline per-step measurement, optimization effort targets the most obvious-looking code — which is rarely the actual bottleneck. | Iron Law 1 and 2. Run SAT and ST05 first. The bottleneck is in the data, not in your intuition. |
| Claim HANA resolves the performance issue | "We're on S/4HANA, the database handles this efficiently" | HANA provides massive acceleration for analytics and aggregation. It does not compensate for N+1 SELECT patterns, missing WHERE clauses, or SELECT * on wide tables. The HANA-optimized cost of a bad query is still higher than the cost of a good query. | Iron Law 4. Run ST05 on HANA. Review the execution plan. Optimize the SQL. Then let HANA accelerate it. |
| Optimize based on code appearance | "I can see this loop looks inefficient" | Runtime behavior does not match static code appearance. A "complex" section may be fast; a "simple" SELECT may account for 80% of runtime. Profiles reveal the truth. | Iron Law 1. Run SAT. Optimize what the profiler shows is slow, not what looks slow in the editor. |
| Test with reduced data volume | "DEV doesn't have full data, but the logic is the same" | O(n log n) and O(n²) algorithms produce unnoticeable differences at 10,000 rows. They produce minutes-to-hours differences at 10,000,000 rows. Performance testing without production volume is not performance testing. | Iron Law 3. Use a production copy, anonymized if necessary, or generate representative volume. If neither is possible, document the extrapolation risk explicitly. |
| Optimize everything at once | "While I'm in here, I'll clean up all the inefficiencies" | Multiple simultaneous changes make it impossible to attribute improvement (or regression) to a specific change. Each optimization must be isolated, measured, and confirmed before the next is applied. | One change at a time. Measure after each. Build a change log with before/after for each discrete optimization. |
| Mark performance as resolved after single test run | "I ran it and it's faster now" | One test run is not a measurement. Network variability, buffer state, lock contention, and resource competition all affect single-run results. Measure multiple runs, discard outliers, compare medians. | Iron Law 5. Record three or more runs before and after. Compare medians. Document the methodology. |
Watch for these phrases in your own reasoning — each one signals you are about to skip measurement:
<HARD-GATE> Before implementing any performance optimization: confirm (1) a baseline measurement has been recorded using SAT, ST05, or applicable monitoring tool, (2) the specific bottleneck has been identified from profiling data — not from code inspection, (3) the proposed optimization targets the identified bottleneck specifically, and (4) a test plan with production-representative data volume exists. If any of these four conditions is not confirmed, no optimization changes may be implemented. </HARD-GATE>
Before touching any code or configuration, record current performance metrics:
/nsat. Execute the program. Export the trace. Record gross time and net time by program and call hierarchy. Identify the top 10 time consumers by gross time percentage.Evidence: Baseline document with three run times, SAT export with top 10 time consumers, ST05 summary with SQL statement list. Gate: Baseline documented. No optimization work begins until baseline is recorded and the primary bottleneck category is identified (SQL / ABAP logic / memory / locking / system resource).
Analyze baseline data to locate the specific bottleneck. Apply the 80/20 rule — find the operation consuming 80% of time and optimize that first.
SQL Bottlenecks (identified in ST05):
ABAP Logic Bottlenecks (identified in SAT):
Memory Bottlenecks (identified in ST02 and memory monitors):
Evidence: Written bottleneck statement identifying the specific operation, its location (program, method, line), its contribution to total runtime (% from SAT or absolute from ST05), and category. Gate: Bottleneck is specific — a named method, a specific SQL statement, a named internal table operation. "The program is slow" is not a bottleneck. "SELECT FROM BKPF at line 247 of ZCL_INVOICE_BATCH runs 50,000 times and accounts for 78% of total SQL time" is a bottleneck.
Match the bottleneck category to the correct optimization technique. Do not apply techniques that do not match the identified bottleneck.
For SELECT in loop (N+1 pattern):
For full table scan:
For wrong internal table type:
For memory volume:
For ABAP logic in hot path:
For HANA-specific optimization:
Evidence: Optimization approach selected and documented with rationale referencing the bottleneck evidence from Step 2. Gate: Optimization technique directly addresses the identified bottleneck. No speculative optimizations applied to areas not identified in baseline profiling.
Apply one optimization change. Document what was changed before implementing it. After each change, repeat the measurement from Step 1 and compare to baseline.
Evidence: Change log entry with: what was changed, why (referencing bottleneck), before metric, after metric. Gate: Each change is isolated. Measurement taken after each change. Regression check confirms no degradation in non-optimized paths.
Confirm optimization holds at production-representative data volume. If DEV does not have production volume:
Evidence: Test run results at production volume. Comparison of baseline vs. optimized at representative volume. Gate: Improvement confirmed at production volume OR volume gap documented with explicit monitoring plan.
Complete the performance report before transporting. The report is a deliverable — not a post-production afterthought.
Evidence: Completed performance report. Transport released after code-review. Gate: Performance report completed. Code-review completed on all changed objects. Transport to production via standard path.
PERFORMANCE TUNING REPORT
==========================
Program / Transaction: [Name and T-code]
System: [SID and client]
Analysis date: [Date]
Analyst: [Name]
Ticket / Request: [Reference]
BASELINE METRICS
----------------
Measurement method: [SAT / ST05 / wall-clock / /SDF/MON]
Test data volume: [Record count and table/entity name]
Run 1: [Time] Run 2: [Time] Run 3: [Time] Median: [Time]
SAT top 5 time consumers (baseline):
[Rank] | [Program/Method] | [Gross %] | [Net Time]
ST05 SQL summary (baseline):
[Statement] | [Executions] | [Records fetched] | [Avg time ms] | [Index used Y/N]
BOTTLENECK IDENTIFIED
---------------------
Category: [SQL / ABAP Logic / Memory / Locking / System Resource]
Location: [Program, method, line number]
Description: [Specific operation and why it is the bottleneck]
Contribution: [% of total runtime or absolute time]
OPTIMIZATIONS APPLIED
---------------------
Change 1:
What changed: [Description]
Why: [Bottleneck evidence reference]
Before: [Metric]
After: [Metric]
Delta: [Improvement %]
[Repeat for each discrete change]
POST-OPTIMIZATION METRICS
--------------------------
Test data volume: [Same as baseline — must match]
Run 1: [Time] Run 2: [Time] Run 3: [Time] Median: [Time]
Total improvement: [%] ([Before median] → [After median])
PRODUCTION VOLUME VALIDATION
-----------------------------
Volume tested: [Record count]
Production volume: [Estimated record count]
Volume match: [Yes / Partial — see risk note / No — monitoring plan required]
Risk note: [If volume gap exists — document extrapolation and monitoring plan]
TRANSPORT
---------
Transport number: [DEVK9XXXXX]
Changed objects: [List]
Code review: [Completed / Pending — must be completed before PRD transport]This skill is complete ONLY when ALL of the following are true:
Evidence required: Baseline measurement document (SAT export, ST05 summary), performance report with before/after metrics, code-review approval, transport confirmation.
After completing this skill, invoke: code-review Conditions for handoff: After all optimization changes are confirmed by measurement and the performance report is drafted, submit all changed objects for code-review. Attach the performance report — the reviewer needs the baseline, the identified bottleneck, and the post-optimization metrics to evaluate whether the changes are correct, complete, and do not introduce new defects.
code-review to review all optimization changes before transport releasetroubleshooting if performance profiling reveals an underlying error condition (dump, lock escalation, resource exhaustion) rather than a pure code efficiency issuedevelopment-workflow for transport creation and management after review approval~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.