Slow Convex queries
Query takes >1s
Query takes >1s
Almost always: missing index. The query is using
.filter() instead of .withIndex(). Add an appropriate index to the schema; re-prompt or hand-edit the query to use it.`.collect()` returning huge arrays
`.collect()` returning huge arrays
Replace with
.paginate() to fetch incrementally. See Pagination.Deep N+1 problem
Deep N+1 problem
Joining many related records inside a query. Either denormalize or batch the lookups.
Slow page loads
Initial load >3s
Initial load >3s
Bundle too large. Code-split routes, lazy-load heavy components, audit npm dependencies.
Time to interactive slow
Time to interactive slow
Render-blocking resources or many small fetches. Use Suspense boundaries; combine queries.
Images slow
Images slow
Use WebP / AVIF; serve appropriately-sized images; lazy-load below-the-fold.
Slow agent responses
Build takes >2 min
Build takes >2 min
Large project (1000+ files) or expensive type-check. Sometimes unavoidable; consider modularizing.
Agent retries multiple times
Agent retries multiple times
Type errors require multiple corrections. Often a sign the prompt set up an inconsistent ask. Re-prompt with the resolution.
Profiling
vly’s editor includes a Convex query profiler:Related
Indexes
Make queries fast.
Pagination
Avoid loading huge arrays.
Caching
For expensive computations.
