Question

Lovable app is slow to load, 6 seconds on a good connection

Solved · 312 viewsasked by noor_builds

It's a small CRUD app. Six seconds until anything shows.

What I’ve tried

Asked Lovable to optimize. It added a loading spinner.

Comment

2 answers

Marked as helpful by the asker
dev_ana

A spinner is the AI admitting defeat. Open DevTools → Network: I bet you see one 5 MB JavaScript bundle. Lovable imports whole icon and chart libraries. Ask it specifically: 'Import only the icons we use from lucide-react by name. Lazy-load the chart component with React.lazy.' Those two usually cut 70%.

Comment
Bundle was 4.8 MB. After the named icon imports and the lazy chart it's 1.1 MB, first paint under 2 seconds. noor_builds
kenji_w

To see what is in the bundle instead of guessing: Lovable projects are Vite, so npx vite-bundle-visualizer after a build gives you a treemap. The big blocks are your to-do list. Usually it's the icon set, a chart library and a date library with all locales.

Comment
The treemap is great. The date library was 600 KB of locales I don't use. noor_builds