Why Your AI App Is Slow: Performance Problems and How to Find Them
"Slow" is a vague complaint, but AI-built apps tend to be slow in predictable ways. Generated code optimizes for producing something that works, not something that loads fast — so a handful of the same issues show up again and again. The good news: every one of them is findable with tools already built into your browser, and most are cheap to fix.
Here's where the time usually goes, from the biggest wins down.
1. Enormous, unoptimized images
This is the most common culprit and often the single biggest win. A hero image straight off a camera or a stock site can be several megabytes, and the AI happily drops it in at full size. Fix: resize images to the dimensions they actually display at, compress them, use a modern format, and add loading="lazy" to images below the fold. Images are usually the heaviest thing on a page, so this alone can transform load time.
2. Loading everything up front
Generated apps often ship the entire application — every screen, every library — before the first screen can even render. The user waits on code they may never reach. Fix: load what the first view needs, and defer the rest until it's actually used (lazy-loading and code-splitting). A visitor should never pay the download cost of page five to see page one.
3. Too many requests and blocking scripts
A page that makes dozens of separate requests, or that waits on a large script before it can show anything, feels sluggish even on a fast connection. Fix: cut the number of requests where you can, and make sure scripts that aren't needed for the first paint don't block it. The first thing the user sees shouldn't wait on the last thing that loads.
4. Doing expensive work in the wrong place
Inefficient loops, components that re-render far more than they need to, or the same data fetched over and over — none of it is visible in a small demo, and all of it compounds with real data. Fix: look for work that repeats needlessly and do it once. If the app gets slower the more data you add, this is usually why.
5. Fetching in a waterfall instead of in parallel
Generated code often requests one thing, waits, then requests the next, then the next — each call blocking the one after it. If those requests don't depend on each other, they can run at the same time. Fix: fire independent requests together so their wait times overlap instead of stacking up.
6. No caching
Refetching data that hasn't changed, or re-downloading assets on every visit, wastes time the browser would happily save you. Fix: cache responses that don't change often, and let static assets be cached by the browser so return visits are near-instant.
How to find where the time actually goes
Don't guess — measure. Your browser's developer tools tell you exactly what's slow:
- Open the Network panel and reload. Sort by size to spot the heavy files (usually images), and read the waterfall to see what's waiting on what.
- Run a performance/Lighthouse pass. It reports how long until the first meaningful content appears and points at the biggest offenders in plain language.
- Throttle to a slow connection and test on a real phone. Your fast laptop on office wifi hides problems that a phone on mobile data will not. Measure the way your users actually load it.
Performance work has a satisfying property: a few targeted fixes — usually starting with images — tend to account for most of the speed-up. Measure first, fix the biggest thing, measure again.
Get the free Playground and run the speed audit →
Related: from AI prototype to production — the hardening pass →