跳到正文
cccskills
免费在 GitHub 公开中文介绍

openclaw-performance

通过操作次数与实测数据排查OpenClaw启动、聊天和界面显示缓慢的原因,优先减少不必要的处理,并支持性能改进PR的编写与审查。

原文查看原文说明

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.

AI 评分90分/ 100查看安装方法

适用场景

  • 排查启动或聊天响应缓慢
  • 减少重复SQL查询与文件读取
  • 根据实测数据审查性能改进PR
  • 判断是否需要添加缓存

中文介绍

功能

排查OpenClaw启动、聊天和界面显示缓慢的原因,并支持性能改进的实施与PR审查。除了耗时,还会统计SQL执行次数、文件读取次数和界面渲染次数,将不必要的操作追溯到触发它们的代码。改进时依次考虑删除多余操作、复用结果、合并批量处理,最后才考虑缓存。

适用场景

适合启动耗时较长、同一信息被反复读取,或每次更新都会重新渲染整个界面的情况。也可用于整理性能改进PR所需的前后对比表和验收标准,让审查有实测依据。

使用示例

  • “测量Gateway的启动过程,减少不必要的读取。”
  • “根据操作次数和响应时间的对比,审查这个性能改进PR。”
  • “添加缓存之前,先检查能否消除重复处理。”

注意事项

需要使用OpenClaw现有的基准测试和测量脚本。测量应经过实际通信路径,区分首次运行与重复运行,并交替测量修改前后版本,每个版本至少五次。如果影响用户的指标变差,必须由负责人在PR中明确接受。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

客观评估

AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。

指令清晰度能否看出何时使用、做什么
A良好明确列出启动和聊天延迟排查、性能改进PR及添加缓存时的用途。
步骤具体性步骤、输入输出和示例是否具体
A良好规定从测量到交付的四个阶段、每版至少五次采样及PR证据项目。
安全性发送数据、删除文件、执行命令等是否有说明
A良好要求保留保障约定的检查,并在指标退步时取得负责人的明确接受。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足列出现有基准测试命令,但未提供OpenClaw环境的安装配置步骤。

总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月19日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md6.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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.

FlowCommitted workload
CLI startuppnpm test:startup:bench (:check holds the budget)
Gateway startup / restartscripts/bench-gateway-startup.ts, scripts/bench-gateway-restart.ts, scripts/perf/post-restart-burst-measure.ts
Chat turn, frames per turnscripts/bench-channel-turn.mts, scripts/perf/transcript-broadcast-measure.ts
Control UI cold loadscripts/bench-control-ui-cold-load.ts, pnpm ui:check-performance (:base compares)
Session list, multi-agent shapescripts/perf/team-shape-fixture.ts, src/gateway/session-list-viewers.perf.test.ts
Concurrency, SQLite statescripts/bench-gateway-concurrency.ts, pnpm test:sqlite:perf
  • Counts first: operations per action (SQL statements, RPCs and frames, file reads, catalog or registry loads, spawns, renders) before wall time. Counts hold steady on a loaded host. A count that should be zero is the bug.
  • Real flow: an isolated Gateway on the head under test, real transport, the slow path included. A mock Gateway, a stale build or a dev server measures something else.
  • Samples: baseline and candidate interleaved (ABAB), at least 5 each, cold and warm apart; median and p95 with spread, run serially, host load recorded.
  • Rerunnable: only committed scripts count; extend an existing one when none fits.
  • Profile: node --cpu-prof per thread, or a browser performance trace, on the hot path.

Done when the flow has a committed workload, a baseline table and a written rule.

2. Find waste

Ask of every counted operation: does this request need it? Recurring OpenClaw waste:

  • Eager work on the critical path: a registry lookup imported the plugin loader (#133518, 47.07 s → 10.36 s); optional runtimes loaded at startup (#119374).
  • Per-row or per-call recompute: a sync read per archived row (#156665, 56,700 reads → 0); log patterns resolved per frame (#150042, 539 → 17 ms per 10,000 frames).
  • Re-checking admitted state: schema, admission or freshness checks on warm handles (#166102, #172676; 14 PRs in the SQLite admission chain).
  • Full rescan per streamed delta: every token reprocessed the whole reply (#158526, 5,342 → 1 ms CPU at 256 KiB).
  • Re-reading your own write: two database backups per lookup (#161551, 772.8 → 7.7 ms); Doctor rescanned and backed up what it had just checked (#174665, ~26 → 3.0 s).
  • Repeated catalog or registry builds: a per-agent catalog rebuild at startup (#116261, 24.9 → 5.0 s); rebuilds per miss or TTL (#127178, #167008).
  • Waiting on optional data: the Usage page waited on provider plans and retried unrelated reads (#176358).
  • Defensive copies and wrapping: structuredClone per turn (#172940, 1.685 MiB → 0); per-value boundary wrapping (#163818, 11,571 → 500 ns/event).
  • Spawn or fan-out per call: a child process per resolution (#155779, 100 → 0).
  • Render cascades and full payloads: a render per update (#159400, 250 → 79); full rows resent for one delta (#165404, 21.75 → 0.95 MB).

Done when each dominant count traces to the code that issues it, with a yes or no on "needed".

3. Fix in this order

  1. Delete the waste. Deletes rarely come back; a failed delete removed a guard, so keep every check that protects a contract and prove the contract still holds.
  2. Once at the owner: callers consume the owner's recorded fact.
  3. Carry the prepared fact through the hot path.
  4. Batch independent work, and prove the batch keeps frames, latency tails and cold start steady: coalescing was reverted three times (#162560, #173901, #175092).
  5. Cache, with a written reason why steps 1–4 do not apply. Follow root "Cache identity", invalidate from the owner's writes, bound the size, and add an interleaved work-count test. Three of four cache re-fixes were silent misses: readers evicting each other (#115369 → #174741), a budget that thrashed (#149773 → #149879).

A worker move or a deferral relocates cost; count main-thread and total work both.

Done when the waste is gone from the counts, or the PR says which step stopped and why.

4. Land

  • Rerun the step 1 workload on baseline and candidate under the same rule.
  • Every user-facing metric holds or improves: latency, p95/p99, frames, cold start, CPU, memory, counts. A worse metric needs the owner's explicit acceptance in the PR. A 20% move in one cell is a stop, never "within spread": five of six reverted performance PRs showed their regression in their own body.
  • Revert changes without a measurable gain.
  • Proof lives in the PR, not in new tests: the before/after counts are the evidence. Extend a flow's existing work-count test only when this waste has come back before; test-audit owns test value.
  • PR evidence: workload command, acceptance rule, before/after table (counts and times, median and p95, samples), waste removed, and any metric that moved the wrong way.

Done when the table meets the rule written in step 1.

Related

Test-suite speed: openclaw-test-performance. Test heap growth: openclaw-test-heap-leaks. CI capacity: openclaw-ci-limits.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

1password

免费有简介AI 评分 100分

检查1Password命令行工具的安装和认证,将已保存的密码或API密钥传入命令及配置。支持桌面应用集成、服务账号和交互式登录,并先验证访问权限。

  • 安装1Password命令行工具
  • 将API密钥传入命令
  • 在CI中使用服务账号认证
openclaw/openclaw39.2万2026年10月19日 更新

acp-router

免费有简介AI 评分 80分

将提交给OpenClaw的自然语言请求转交给Claude Code等外部编程智能体,通过ACP或acpx启动、继续会话,并保留对话上下文。

  • 在讨论串中启动Claude Code
  • 继续外部智能体的现有工作
  • 通过acpx直接传递指令
openclaw/openclaw39.2万2026年10月19日 更新

add-model-provider

免费有简介AI 评分 100分

为OpenClaw添加模型服务商,并通过实际回复验证连接。凭据以环境变量或文件引用的形式配置,同时验证设置并报告测试结果。

  • 为OpenClaw添加模型服务商
  • 通过引用配置认证凭据
  • 确认模型能返回实际回复
openclaw/openclaw39.2万2026年10月19日 更新

agent-transcript

免费有简介AI 评分 90分

将AI代理的工作日志整理为可附在GitHub拉取请求或议题中的记录,筛选相关内容、移除敏感信息,并支持预览及经单独授权后的发布。

  • 为拉取请求整理代理工作记录
  • 从本地日志提取相关请求和结果
  • 预览已移除敏感信息的记录
openclaw/openclaw39.2万2026年10月19日 更新

apple-notes

免费有简介AI 评分 100分

通过代理管理macOS上的Apple Notes笔记,支持创建、查看、搜索、编辑和删除,在文件夹之间移动笔记,并将选定笔记导出为HTML或Markdown。

  • 创建带标题的笔记
  • 按文件夹筛选或模糊搜索笔记
  • 编辑笔记并整理文件夹
openclaw/openclaw39.2万2026年10月19日 更新

apple-reminders

免费有简介AI 评分 70分

通过Mac查看、添加和编辑Apple Reminders中带截止时间的待办事项,管理列表并完成或删除任务,整理在iPhone或iPad上查看的个人任务。

  • 查看今天和已逾期的任务
  • 添加带截止日期的个人待办事项
  • 整理iPhone或iPad上的任务
openclaw/openclaw39.2万2026年10月19日 更新

查看 openclaw 的全部技能

报告此技能的问题