convex-performance-audit

Diagnoses and fixes Convex performance issues across reads, writes, subscriptions, and function limits.

5|Updated Mar 5, 2024
One-click install
npx skills add https://github.com/TRAPZZY/God-Eyes --skill convex-performance-audit-trapzzy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-performance-audit
Source: https://github.com/TRAPZZY/God-Eyes/tree/main/.trae/skills/convex-performance-audit
Command: npx skills add https://github.com/TRAPZZY/God-Eyes --skill convex-performance-audit-trapzzy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Convex applications can become slow or expensive due to read amplification, OCC write conflicts, excessive reactive subscriptions, or functions hitting execution and transaction limits. This Skill provides a structured audit workflow that starts from real signals like npx convex insights --details and routes each symptom to targeted fixes. ## Core Features & Use Cases - Signal-Based Diagnosis: Gathers performance signals from Convex CLI insights, deployment health data, or code audits, then routes them to the right problem class. - Four Problem-Class Playbooks: Reference guides cover hot-path read rules, OCC conflict resolution, subscription cost reduction, and function budget limits, each with code examples and a recommended fix order. - Sibling Function Consistency: Ensures fixes are applied across all functions touching the same tables, not just the one flagged by an insight. - Use Case: Your Convex dashboard shows high bytes read and OCC conflicts on a project list page. The Skill traces the full read/write set, replaces scan-and-filter queries with indexed reads, adds no-op write protection, and verifies no regressions. ## Quick Start Audit this Convex app for performance issues, starting with the strongest available signal, and suggest the smallest high-impact fix before proposing structural changes.

Frequently Asked Questions about convex-performance-audit

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

FAQPage Schema
How do I fix slow Convex queries with high bytes read?▼

Run npx convex insights --details to identify hot functions, then replace scan-and-filter patterns with withIndex queries so storage does the filtering. For hot list pages, consider digest tables that read smaller document shapes instead of full source rows.

How to resolve OCC conflict errors in Convex mutations?▼

OCC conflicts come from write contention on hot documents or broad read sets. Narrow reads with indexed queries, split hot documents like counters into shards, skip no-op writes, and move non-critical bookkeeping to scheduled functions.

Does Convex .filter() push predicates to the storage layer?▼

No, the Convex .filter() method has the same performance as filtering in JavaScript and does not reduce documents scanned. Only .withIndex() and .withSearchIndex() actually push filtering to storage.

Why does my Convex app have slow UI updates with many subscriptions?▼

Every useQuery and usePaginatedQuery creates a live subscription that re-runs when its read set changes. Reduce cost by batching related data into fewer queries, using skip for unready args, isolating frequently-updated fields, and removing Date.now() from queries.

What are the Convex function execution and transaction limits?▼

Queries and mutations get 1 second of user-code execution time, 16 MiB read and written per transaction, and 32,000 documents scanned. Actions get 10 minutes. Break large mutations into cursor-based self-scheduling batches to stay within budgets.

When should I not restructure my Convex schema for performance?▼

Avoid digest tables, document splitting, or migration-heavy rollouts when scale is small, traffic is modest, or signals are weak. A simple scan on a small table is often acceptable in Convex, so only restructure with a measured signal or known hot path.