November 22, 2026 · 8 min read · Thomas Osayi
Why is my Lovable app slow? How to find and fix it
A slow Lovable or Bolt app usually comes down to five causes: N+1 queries, missing indexes, huge bundles, raw images and re-renders. How to measure each and fix it.
A slow app feels like one big problem, but it almost never is. When someone sends me a Lovable or Bolt app that takes six seconds to show a dashboard, the cause is usually one or two specific things stacked together: a page that makes forty database calls, a table with no index, and three megabytes of JavaScript for a screen with a list on it.
The good news is that each of those is findable and fixable without rebuilding anything. Here is how I track them down, in the order I check them.
Why is my Lovable app so slow?
Usually because the AI wrote code that works perfectly with ten rows of test data and badly with a thousand rows of real data.
Lovable generates a React app built with Vite, usually backed by Supabase. That stack is fast by default. What makes it slow is the code generated on top of it, which optimizes for "it works" rather than "it works at scale." The patterns I see most often:
- N+1 queries: one request for a list, then one more request for each item in it.
- Missing indexes: queries that filter by a column Postgres has to scan row by row.
- Huge bundles: every page, chart library and icon set shipped in one JavaScript file.
- Raw images: full-resolution phone photos displayed as thumbnails.
- Re-renders: components that refetch or recalculate on every keystroke or in an infinite loop.
Bolt, v0 and Cursor apps show the same patterns. The rest of this post is how to tell which ones you have.
How do I measure what is actually slow?
Use four tools, each for a different layer: Lighthouse for the page, the network tab for requests, the React Profiler for rendering, and Supabase's query tools for the database.
Lighthouse
Open your live app in a Chrome incognito window, open DevTools, go to the Lighthouse tab and run a performance audit. It works on signed-in pages too. Ignore the overall score at first and read the list of opportunities: large images, unused JavaScript, render-blocking resources. You can also run it from PageSpeed Insights for public pages.
The network tab
Reload the slow page with the Network tab open and filter by Fetch/XHR. Count the requests to your Supabase URL. A dashboard that needs 5 requests is healthy. One that makes 60 has an N+1 problem. Sort by size to find heavy downloads.
React Profiler
Install React Developer Tools, open the Profiler tab, record while you interact with the slow screen, and look for components that render dozens of times or take a long time per render.
Supabase query performance
In the Supabase dashboard, the Query Performance report and the Performance Advisor show your slowest and most frequent queries, and the advisor can suggest indexes using the index_advisor extension.
What are N+1 queries and how do I fix them?
An N+1 query is when the app fetches a list with one request and then makes another request for every item in that list, so 50 items means 51 round trips.
In AI-built React apps it usually looks like a list component that maps over projects and renders a card, where each card has its own effect that fetches that project's owner, task count or latest comment. Each request might take 80 milliseconds, but 50 of them in parallel still crowd the network, and on a phone they queue up.
The fix is to fetch related data in one query. Supabase's client lets you embed related tables in a single select, for example selecting projects along with their owner's name and their tasks in one call, as long as a foreign key links the tables. For counts and totals, a Postgres view or a database function that returns one row per project is usually cleaner than counting in the browser.
Two related patterns to look for while you are in there:
- Selecting every column with select star when the page shows three fields. Ask for only what you display.
- Fetching every row and filtering in JavaScript. Filter and paginate in the query instead, with a range or limit, so the database sends 20 rows rather than 2,000.
Do missing indexes make an app slow, and how do I add them?
Yes, and they are the most common cause of an app that was fast at launch and gets slower every week as data grows.
Without an index, Postgres answers "give me all tasks where project_id equals X" by reading every row in the table. With ten thousand rows that becomes noticeable, with a million it becomes painful. Postgres creates indexes for primary keys and unique constraints, but it does not automatically index foreign key columns, and AI builders rarely add indexes on their own.
Columns that almost always need an index in a typical app:
- Foreign keys you filter or join on, such as user_id, project_id or organization_id.
- Columns used in row level security policies, because the policy runs on every query. A policy that checks user_id against the signed-in user needs user_id indexed.
- Columns you sort by on big lists, such as created_at.
Add indexes through a migration so they are recorded in your project history, and check the Supabase Performance Advisor afterwards, which also flags unindexed foreign keys. Supabase's own guidance notes that building an index locks the table against writes, so on large tables build it at a quiet time or use the concurrent option. My post on changing a Supabase database safely covers how to ship that kind of change without surprises.
Is my JavaScript bundle too big?
If the Vite build warns that some chunks are larger than 500 kB after minification, or Lighthouse flags lots of unused JavaScript, then yes.
AI builders tend to import libraries generously and route every page through one bundle. A user loading the sign-in page downloads the code for the admin dashboard, the chart library and the rich text editor too. On a mid-range phone, parsing that JavaScript can take longer than downloading it.
Fixes, in order of payoff:
- Split by route. Wrap page components in React.lazy with Suspense so each page loads its own code when visited.
- Lazy load heavy widgets. Charts, maps, editors and PDF viewers can load only when they scroll into view or a tab opens.
- Replace oversized libraries. Full date libraries, whole utility libraries and entire icon packs imported at once are common culprits.
- Remove dead code. Generated apps often keep components and dependencies from abandoned prompts.
A bundle visualizer plugin for Vite shows you exactly which packages take up the space, which turns guessing into a short list.
How do images slow down an AI-built app?
Images are often the heaviest thing on the page, and AI-built apps usually display whatever the user uploaded, at whatever size it was uploaded.
A photo from a modern phone can be several megabytes. Show twenty of them as small thumbnails in a grid and the page downloads tens of megabytes it does not need. This hits storefronts, listing pages, profile galleries and any app with user uploads.
A shop page like the LACEUP storefront I built, with a grid of product photos, is exactly where image handling decides how fast the page feels.

What to do:
- Resize and compress on upload, storing a thumbnail and a display size in modern formats such as WebP.
- Set explicit width and height on images so the layout does not jump while they load.
- Add loading="lazy" to images below the fold, and keep the main hero image eager.
- If you move to Next.js, its image component handles resizing and formats for you, with the configuration covered in my post on the next/image hostname error.
Why does my app re-render so much, and does it matter?
It matters when renders are expensive or endless, and the usual cause in generated code is state or effects wired so that one change triggers a cascade.
Patterns I see repeatedly:
- An effect that fetches data and sets state, with a missing or wrong dependency list, so it refetches on every render. In the network tab this looks like the same request firing over and over.
- One giant context provider holding user, settings, cart and filters, so typing in a search box re-renders the whole app.
- Expensive calculations, like sorting a big list, done inline on every render.
- New objects or functions created on every render and passed to memoized children, which defeats the memoization.
The React Profiler shows which components render and how long each takes. Fix the loops first, since an effect that refetches endlessly also burns through your Supabase request quota. Then split large contexts, move filtering into the query, and use useMemo for genuinely expensive work. Do not wrap everything in memo by default; measure, then fix the few components that matter.
What does a typical speed fix look like? A worked example
Here is an illustration with a made-up app: a client portal for a small accounting firm, built in Lovable, where the documents page took about seven seconds to load for clients with a long history.
Measuring showed three problems. The network tab had 48 requests to Supabase on one page load, because each document row fetched its uploader's name separately. The Query Performance report showed the documents query scanning the whole table, because client_id had no index and the RLS policy filtered on it. Lighthouse flagged 2.4 MB of JavaScript, mostly a PDF viewer and a chart library loaded on every page.
The fixes: one query that embedded the uploader name, an index on client_id added by migration, pagination at 25 documents, and lazy loading for the PDF viewer and charts. The page went from 48 requests to 2 and became fast on a phone. None of it required touching the design. Work of that size fits my Fix Plus Features package from $200, and a single clear cause, like one missing index, fits a Quick Fix from $60.
The bottom line
A slow Lovable app is a measurement problem before it is a coding problem. Count the requests, read the Lighthouse opportunities, profile the renders and check the slowest queries, and you will usually find one to three specific causes. Fix those, verify with the same tools, and leave the rest alone. If you would rather hand it off, my fix your Lovable app page explains how I take on exactly this kind of work, and "Core Web Vitals explained for small business owners" covers what the speed numbers mean for search.
Questions, answered in one line
Why is my Lovable app fast in the preview but slow for users?
The preview usually runs with a few test rows, while real users bring hundreds or thousands of rows, slower phones and slower networks, which exposes missing indexes and oversized pages.
Is Supabase slow?
Supabase runs on Postgres, which is fast when queries use indexes and fetch only what they need, so slowness usually comes from how the app queries it.
What Lighthouse score should my app aim for?
Treat the score as a guide rather than a target and focus on the specific opportunities it lists, such as large images, unused JavaScript and long main thread tasks.
Will upgrading my Supabase or hosting plan fix a slow app?
Rarely on its own, because more compute does not fix a query that scans a whole table or a page that downloads several megabytes of JavaScript.
How much does it cost to speed up an AI-built app?
Thomas Osayi fixes one specific performance bug from $60, and handles up to three fixes plus a small feature from $200 over five days.
Sources
- Introduction to Lighthouse Chrome for Developers
- <Profiler> React
- Steps to improve query performance with indexes Supabase
Related articles
- Supabase auth redirect URL not working? Fix localhost, preview and production redirects
- Environment variables undefined on Vercel? Every cause and fix
- How to fix a CORS error on a Next.js API route
- Firestore "Missing or insufficient permissions": what triggers it and how to fix it
Fix, finish and launch your AI-built app
Built your app with Lovable, Bolt, v0, Replit or Cursor and got stuck? I fix the bugs, connect auth and payments, clean up the code and deploy it to production.
See the service