
Performance Work
Find and remove waste in slow OpenClaw flows before adding any cache.
Install
npx skills add openclaw/openclaw --skill openclaw-performance -g -a claude-code -y- Repository
- openclaw/openclaw394k
- Category
- Engineering
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 1,596 tokens
- Runs scripts
- No, instructions only
What it does
Performance work in OpenClaw: a slow or heavy flow (latency, CPU, memory, SQL, RPC, renders), writing or reviewing a perf PR, or adding a cache. Count the work, delete waste first, cache last.
OpenClaw Performance
Waste is work a request does not need. Big speedups come from deleting waste, not from doing the same work faster. A cache is the last resort: it hides waste until its key, invalidation or hit rate breaks, and the waste returns.
1. Measure
Write the acceptance rule in the PR before the first run: flow, workload, metric, cold or warm, samples, and the change that counts as a win or a regression.
| Flow | Committed workload |
|---|---|
| CLI startup | pnpm test:startup:bench (:check holds the budget) |
| Gateway startup / restart | scripts/bench-gateway-startup.ts, scripts/bench-gateway-restart.ts, scripts/perf/post-restart-burst-measure.ts |
| Chat turn, frames per turn | scripts/bench-channel-turn.mts, scripts/perf/transcript-broadcast-measure.ts |
| Control UI cold load | scripts/bench-control-ui-cold-load.ts, pnpm ui:check-performance (:base compares) |
| Control UI older-history paging | scripts/bench-control-ui-history-depth.ts |
| Session list, multi-agent shape | scripts/perf/team-shape-fixture.ts, src/gateway/session-list-viewers.perf.test.ts |
| Concurrency, SQLite state | scripts/bench-gateway-concurrency.ts, pnpm test:sqlite:perf |
