afterbuild/ops
Solution

Fix slow AI app — before users leave.

AI builders optimise for generation speed, not runtime speed. The result: N+1 queries hitting Supabase on every render, unindexed tables full-scanning on every request, and JavaScript bundles that take 8 seconds to load.

Quick verdict

Most AI-built app performance issues come from 2–3 root causes. We find them, fix the highest-impact ones first, and measure the before/after on real query times.

What makes AI-built apps slow

01
N+1 queries on every render
A list component fetches one row per item. 50 items = 50 Supabase calls per page load. AI builders write this pattern constantly.
02
Unindexed foreign keys
Supabase tables with foreign key columns but no index. A query that should take 5ms full-scans millions of rows instead.
03
No pagination on large tables
AI-generated queries fetch all rows, filter in JavaScript. Works fine at 100 rows. Breaks at 10,000.
04
Oversized JavaScript bundles
Unused imports, unshaken tree, libraries imported in full when only one function is used. Common in AI-generated code.
05
No query caching
Every navigation refetches the same static data. Without caching headers or a query layer, every page load hits the database.
06
Images not optimised
Full-resolution images served to mobile. No WebP conversion. No lazy loading. One page with 10 product images can cost 30MB on first load.
FAQ
How do you measure performance?
We use Supabase's query performance dashboard, pg_stat_statements for slow query identification, Lighthouse for frontend metrics, and Next.js bundle analysis. We measure before and after every change.
What's the most common cause of slowness?
N+1 queries. A component that renders a list and fetches each item individually. We've seen apps where fixing one N+1 reduced database load by 90%.
Will performance fixes break other things?
We scope changes conservatively. Query optimisations (indexes, query restructuring) are low-risk. Bundle changes go through build verification. We don't touch business logic.
How long does a performance engagement take?
Audit is 48 hours. Fix work depends on severity — most apps see meaningful improvement in 3–5 days.
What does it cost?
Performance audit and fix is typically scoped under the Integration Fix tier ($799). Complex database restructuring may scope higher — we'll tell you before starting.
Next step

Free performance audit

We run Lighthouse, analyse your Supabase query patterns, and identify the 2–3 changes that will have the biggest impact. No cost, no commitment.

Book free diagnostic →