convex-performance-audit

Diagnose Convex performance bottlenecks by auditing reads, subscriptions, OCC conflicts, and budgets.

Updated Jun 8, 2024
One-click install
npx skills add https://github.com/shadeiskndr/portfolio --skill convex-performance-audit-shadeiskndr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-performance-audit
Source: https://github.com/shadeiskndr/portfolio/tree/main/.agents/skills/convex-performance-audit
Command: npx skills add https://github.com/shadeiskndr/portfolio --skill convex-performance-audit-shadeiskndr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you diagnose and fix slow or expensive Convex performance by classifying the bottleneck (read amplification, subscription cost, OCC conflicts, or function/transaction budget issues) and applying the smallest high-impact remediation that matches the symptom.

Core Features & Use Cases

  • Guided performance triage: directs you to gather the strongest available signals first (health insights, and npx convex insights --details) before guessing.
  • Problem-class routing to reference playbooks: maps observed signals to the right reference for hot paths, OCC conflicts, subscription cost, or function budget.
  • Flow-based and sibling-aware auditing: instructs scoping one concrete user flow, tracing the complete read/write set, then fixing sibling functions consistently to prevent piecemeal regressions.
  • Guardrails for safe optimization: reduces risk of over-engineering by discouraging migration-heavy changes unless there is clear measured signal and a safe rollout plan.

Quick Start

Use the convex-performance-audit Skill to run an insights-driven audit of your slow Convex feature and produce a fix plan that targets the correct problem class first.

Frequently Asked Questions about convex-performance-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose slow Convex subscriptions and high document read amplification?

Diagnose slow Convex subscriptions by gathering health insights and running `npx convex insights --details` to identify high bytes or documents read. Classify the bottleneck as read amplification, subscription cost, OCC conflicts, or function budget issues, then route the specific symptom to a targeted fix playbook.

What causes OCC conflicts and mutation retry contention in Convex?

OCC conflicts in Convex occur when concurrent mutations contend on overlapping read/write sets, triggering retries. Trace the complete read/write set for the scoped user flow, audit sibling writers to ensure consistent fixes, and apply guardrails to minimize transaction contention without over-engineering migrations.

How do I fix Convex functions nearing execution or payload limits?

Fix Convex functions nearing execution or payload limits by auditing function budgets and tracing the full read/write set of the scoped path. Route the function budget issue to the appropriate reference playbook, apply the smallest high-impact remediation, and verify correctness alongside budget improvements.

What is the best way to optimize reactive invalidation-heavy Convex UI?

Optimize reactive invalidation-heavy Convex UI by scoping one concrete user flow and tracing its complete read/write set. Audit sibling readers to prevent piecemeal regressions, apply consistent fixes with guardrails, and verify that subscription cost and invalidation frequency are reduced.

When should I avoid migration-heavy changes to resolve Convex performance bottlenecks?

Avoid migration-heavy changes for Convex performance bottlenecks unless clear measured signal exists from insights and a safe rollout plan is established. The audit workflow prioritizes the smallest high-impact remediation matching the symptom to reduce risk and prevent over-engineering.

Do I need `npx convex insights --details` before optimizing a slow Convex app?

Yes, you need to run `npx convex insights --details` to gather the strongest available signals before optimizing a slow Convex app. This guided performance triage prevents guessing by mapping observed signals directly to the correct problem class for targeted remediation.