Skip to main content

    Playbook · AI & Search

    31 ways to make your vibe-coded app fast

    31 fixes for a slow vibe-coded app, grouped and explained in plain words, plus one prompt that gets Claude to find and fix the ones your app needs.

    Mohamed Ashraf

    What's inside

    • All 31 fixes, grouped by where the slowness comes from
    • What each fix does, in one plain sentence
    • A ready prompt that gets Claude to find the ones your app needs
    • How to test like your users: on a slow phone and a slow network

    Sections

    1. How to use this list
    2. Make it feel fast
    3. Images, files and fonts
    4. JavaScript and pages (unlocks after sign-up)
    5. API calls (unlocks after sign-up)
    6. The database (unlocks after sign-up)
    7. Measure and scale (unlocks after sign-up)
    8. The prompt to paste into Claude (unlocks after sign-up)

    Your app works. It just feels slow. That's rarely one big problem. It's usually a lot of small ones.

    Here are 31 fixes, grouped by where the slowness comes from, each in one plain sentence. You don't need all of them. At the end there's a prompt you can paste into Claude, so it checks which ones your app needs and fixes them for you.

    How to use this list

    • Don't apply all 31 at once. Ask Claude which ones your app needs, then fix them one at a time.
    • After each fix, check that the app still works.
    • Test on a slow phone before your users do.

    Make it feel fast

    1. Add skeleton loading screens. Grey placeholder shapes show where the content will appear, so the page never sits blank while it loads.
    2. Stream AI responses, token by token. Show the answer as it's written, instead of making people wait for the whole thing.
    3. Update the screen before the server answers. When someone taps like or save, show it at once and sync in the background. If the server fails, undo it and say so.

    Images, files and fonts

    1. Serve images in WebP or AVIF. These formats are usually much smaller than JPEG or PNG at the same quality.
    2. Lazy load images below the screen. Only load an image when the person scrolls near it.
    3. Serve static files through a CDN. Images, scripts and styles come from a server close to each user.
    4. Turn on Brotli or Gzip compression. Text files shrink before they're sent.
    5. Let the browser cache static files. Returning visitors don't download the same files again.
    6. Self-host your fonts and use fewer weights. Every font weight is one more file to download.

    Get the rest of this playbook, free

    Enter your email to unlock the full playbook. One sign-up unlocks every playbook in the Founder Library.

    We'll email you new playbooks and occasional updates from Growthino. Unsubscribe any time. See our privacy policy.

    JavaScript and pages

    1. Remove unused dependencies. Packages you no longer use can still end up in what your users download.
    2. Render pages on the server or at build time. People see the content straight away, instead of waiting for JavaScript to build the page.
    3. Load third-party scripts after the page. Chat widgets, trackers and ads shouldn't hold up your own content.
    4. Split JavaScript by page. Each page loads only the code it needs.
    5. Prevent unnecessary re-renders. Stop parts of the screen redrawing when nothing in them has changed.
    6. Virtualize long lists. Only draw the rows that are on screen, even when the list has thousands.

    API calls

    1. Prevent duplicate API calls. The same request sent twice is wasted time. Fetch once and share the result.
    2. Debounce search and autocomplete. Wait until the person stops typing for a moment, instead of searching on every key.
    3. Paginate API results. Send 20 or 50 items at a time, not the whole table.
    4. Run independent requests in parallel. If two calls don't need each other, start both at once.
    5. Set timeouts on external API calls. One slow outside service shouldn't freeze your whole app.
    6. Move slow tasks to a background job queue. Sending emails, making PDFs or processing uploads can happen after you've answered the user.

    The database

    1. Fix N+1 queries. Loading a list, then running one more query for every item in it, is a classic slowdown. Load it in one or two queries instead.
    2. Add indexes for common queries. An index lets the database find rows without reading the whole table.
    3. Select only the columns you need. Don't fetch every column when the page shows two.
    4. Use connection pooling. Reuse open database connections instead of opening a new one for every request.
    5. Cache data people ask for often, with Redis. Keep frequent answers in memory, so the database isn't asked the same thing again and again.
    6. Put your servers close to your database. Every query travels between them, so distance adds up.

    Measure and scale

    1. Trace slow backend requests with OpenTelemetry. See exactly which step of a request takes the time.
    2. Track real user speed with a performance monitoring tool. Your laptop is fast. Your users' phones may not be.
    3. Load balance traffic across several app instances. Spread the traffic, so one busy server doesn't slow everyone down.
    4. Test on slow phones and networks. Chrome's DevTools can slow down the network and the processor, so you see what a cheap phone on a weak signal sees.

    The prompt to paste into Claude

    Copy this into Claude Code, or whichever AI built your app.

    I don't want my vibe-coded app to feel slow and lose users.
    Go through the list below and tell me which ones my app needs, starting with the biggest win.
    Then fix them one at a time, and check that the app still works after each one.
    
    1. Add skeleton loading screens.
    2. Stream AI responses, token by token.
    3. Update the UI before the server responds.
    4. Serve images in WebP or AVIF.
    5. Lazy load images below the screen.
    6. Serve static files through a CDN.
    7. Enable Brotli or Gzip compression.
    8. Enable browser caching for static files.
    9. Self-host fonts and limit font weights.
    10. Remove unused dependencies.
    11. Render pages on the server or at build time.
    12. Load third-party scripts after the page.
    13. Split JavaScript by page.
    14. Prevent unnecessary re-renders.
    15. Virtualize long lists.
    16. Prevent duplicate API calls.
    17. Debounce search and autocomplete inputs.
    18. Paginate API results.
    19. Run independent requests in parallel.
    20. Set timeouts for external API calls.
    21. Move slow tasks to a background job queue.
    22. Fix N+1 queries.
    23. Add database indexes for common queries.
    24. Select only the columns you need.
    25. Use database connection pooling.
    26. Cache frequently accessed data with Redis.
    27. Place servers close to the database.
    28. Trace slow backend requests with OpenTelemetry.
    29. Track real user speed with a performance monitoring tool.
    30. Load balance traffic across multiple app instances.
    31. Test on slow phones and networks.
    

    Want AI to recommend your startup?

    Growthino helps startups get cited in ChatGPT, Perplexity and Google AI answers. Find out where you stand today.