审查 Convex 读写与订阅性能瓶颈,定位慢功能与并发冲突问题。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "convex-performance-audit" 技能: 1. 下载 https://raw.githubusercontent.com/openclaw/clawhub/main/.agents/skills/convex-performance-audit/SKILL.md 2. 保存为 ~/.claude/skills/convex-performance-audit/SKILL.md 3. 装好后重载技能,告诉我可以用了
请审计这个 Convex 功能的性能问题,重点检查读取放大、订阅数量、慢查询和函数限制,并给出可执行的优化建议。背景:某页面打开很慢,相关查询和函数如下:<贴入代码与现象>
一份性能审计结果,指出慢点来源、潜在根因,以及按优先级排序的优化建议。
请检查这些 Convex 写操作是否存在 OCC 冲突或写竞争问题,说明冲突发生的原因、触发条件,并提出重构事务或数据模型的建议。代码如下:<贴入 mutation 与日志>
对写冲突模式的诊断说明,以及降低冲突率的具体改进方案。
根据 Convex Insights 的发现,帮我审计这些函数的性能与资源使用情况,重点看高频订阅、重复读取和接近函数限制的问题,并输出整改清单。数据如下:<贴入 Insights 结果>
一份基于 Insights 的问题解读与整改清单,便于团队逐项优化。
Diagnose and fix performance problems in Convex applications, one problem class at a time.
npx convex insights --details reports high bytes read, documents read, or
OCC conflictsStart with the strongest signal available:
npx convex insights --details. Use
--prod, --preview-name, or --deployment-name when needed.
insights, try
npx -y convex@latest insights --details before giving up.convex-doctor, you may treat its findings as
hints. Do not require it, and do not treat it as the source of truth.After gathering signals, identify the problem class and read the matching reference file.
| Signal | Reference |
|---|---|
| High bytes or documents read, JS filtering, unnecessary joins | references/hot-path-rules.md |
| OCC conflict errors, write contention, mutation retries | references/occ-conflicts.md |
| High subscription count, slow UI updates, excessive re-renders | references/subscription-cost.md |
| Function timeouts, transaction size errors, large payloads | references/function-budget.md |
| General "it's slow" with no specific signal | Start with references/hot-path-rules.md |
Multiple problem classes can overlap. Read the most relevant reference first, then check the others if symptoms remain.
If the likely fix is invasive, cross-cutting, or migration-heavy, stop and present options before editing.
Examples:
When correctness depends on handling old and new states during a rollout,
consult skills/convex-migration-helper/SKILL.md for the migration workflow.
Pick one concrete user flow from the actual project. Look at the codebase, client pages, and API surface to find the flow that matches the symptom.
Write down:
…
帮助 ClawHub 管理人员执行封禁、解封、角色调整与状态核验。
全面审计网站 SEO 健康度,发现关键词机会、内容缺口与优化优先级。