Testing and Optimisation: Make Your AI-Built App Fast
Why your app is slow and how to fix it: test with Claude, cap image uploads, serve WebP, batch database calls and paginate feeds for a leaner build.
By William Ifeanyi Moore · 2026-07-28 · 10 min read
Testing and Optimisation: Make Your AI-Built App Fast
This is the part nobody posts about. In this post you will learn how I test an AI-built platform function by function before real users touch it, and the three optimisations that took my app from expensive and sluggish to lean: image limits and WebP, batching database calls instead of running everything live, and capping results with a "load more". It is the difference between having a product and having a very pretty demo.
Last time I left you with two nagging questions. Why was your platform serving images as JPEG? And why was it using people's email addresses to identify them, with those emails sitting right there on the front page for the world to see? Hold those — we answer them tonight.
But first, let me describe a temptation I know you are feeling. You are live, the doors are open, people can sign in. So for most first-timers there is a powerful urge to jump straight into the market. Why wait? Everything is ready and loading.
Resist it. Just a little longer. Because there is an old saying among engineers, and I am going to add a line to it. To code is human. To debug is divine. And to optimise is, well, we are going to need to invent a brand new word for that one, because there isn't one holy enough.
Key takeaways
- Test in phases, not randomly. Ask your AI for every page, then every function on each page, then a phased test plan.
- Use a dedicated test account when you let Claude log in as a user. Never your reused personal password.
- Then test by hand yourself, on the live site. Find your bugs before your users do.
- Cap your images (I used 5 per profile, 5MB per upload) and serve WebP, not JPEG. HEIC is great for storage and Apple, but browsers won't display it natively.
- Stop hammering your database. Impressions, clicks and most notifications do not need to be live — sweep and batch every 60 seconds.
- Cap results at about 20 with a "load more." Almost nobody scrolls past the first page of anything.
- Emails are credentials, not name tags. Show a username or display name instead.
You cannot intimidate a super senior engineer
You have done your basic coding. Now, a quiet truth: if you had built from scratch directly on Claude, you might not have so much to clean up right now. But let us be honest about how you actually got here. Chances are you started with training wheels somewhere else, on a Base44 or similar, because if you were the type to start from raw scratch you would not be sitting in this room listening to me. No shame in it. The training wheels got you moving. Now we tighten the bolts.
So you start testing every function and seeing how each one behaves with your new userbase and your new setup. Again, this would all be smoother if you had started on Supabase from the beginning, but here we are, and it is fine.
The whole repair process is just a conversation. "Claude, the search is not returning results. Fix it, and make sure it does A, B and C." That is it. That is the entire skill.
And I need you to internalise who you are talking to:
Claude is a super senior engineer. You cannot intimidate it with your requests.
You will never ask for something too ambitious and watch it sigh and roll its eyes at you. There is no request that is "too much." So if you can think it and articulate it, bro and broette, you can ask Claude to help you build it. The ceiling is your ability to describe, not its ability to deliver.
How to test your app before launch (my actual method)
Let me give you my personal method for private testing, because a method beats motivation every time.
First, I ask Claude for a list of all the pages on my platform. Then I ask for a list of the functions attached to each of those pages. Then, instead of testing randomly, I ask Claude to design a plan to test those functions in phases. And then we work through that plan together, testing against my own account on the live platform.
Yes, you can give Claude an email and password so it can actually run through things as a real user would. One piece of grown-up advice while you do that: use a dedicated test account, not the personal password you reuse across your whole life. Make a clean account, give it those keys, and keep your real credentials your own. Sensible, not paranoid.
On the subject of methods: due to popular demand — and frankly because some of you are gloriously lazy — I have prepared a definitive how-to for all of this, including my own personal prompting techniques that save you a serious amount of tokens. Tokens are money, and clumsy prompting burns them.
Then you test it yourself, by hand, and hate it
After Claude has run its own testing pass, I test the thing myself. On the live site. Going through every single function, one after another, by hand.
I will not lie to you. This is not glamorous. It is, in fact, deeply annoying. It is the opposite of the fun part. But it is non-negotiable, because the rule is simple and merciless:
Find your bugs before your users do, or your users will find them for you.
And users finding your bugs is the expensive way. They do not file polite reports. They just leave, quietly, and never come back, and you never even learn why. So you sit there and you test, you fix, you test again, you fix again, and you repeat the loop until you are actually happy. Not until you are tired. Until you are happy.
Optimisation one: why your images should be WebP, not JPEG
For this part, I had to spend real time combing through YouTube to get a proper idea of what I was doing, and you may have to as well, and that is completely fine. But a lot of it, honestly, was just common sense once I sat down and looked. The core realisation was this: I was being far too generous with space, and generosity with space is a slow, expensive death.
So here is what I did — and these are the answers to last week's JPEG question.
I limited photos on a profile to five maximum. I am not trying to be Instagram here. Nobody needs forty pictures on a profile in the kind of product I am building.
I put a five megabyte cap on uploads. Listen, my platform is not the place for your enormous layered Photoshop file. It is not my system you will come and break, my friend.
But the limits were not enough. The real win was the format. I asked Claude to store images as WebP and HEIC instead of JPEG, because these modern formats save you an enormous amount of space for the same visible quality. Think about it. If you are building a mobile-first app, what are you doing serving people resolutions meant for a billboard? On a small screen, the average eye genuinely cannot tell the difference, but your storage bill and your load times can.
One honest note, since you will go and do this yourself: WebP is your reliable hero because browsers display it everywhere. HEIC is brilliant for compression and for Apple devices, but it does not display natively in most browsers. So a safe pattern is to lean on WebP for what you actually serve to the web, and treat HEIC as a storage and Apple-side advantage rather than your universal delivery format. Ask Claude to handle the conversion sensibly for each surface.
You are not running a photo museum. Serve the smallest thing that still looks right on the screen it is going to.
Optimisation two: stop talking to your database so much
Then I did the thing I should have done from the start, which is simply ask Claude directly to look for areas it could optimise. You have a super senior engineer on call. Use it as one.
The biggest thing it found embarrassed me a little. All of my database calls were set to live. Every impression, every click on an ad, every notification for practically every action a user took — my system was hammering the database in real time to track and report all of it. For a platform trying to monitor things like ad impressions and clicks, that is a quiet catastrophe. You are paying, in money and in strain, for a level of immediacy that nobody actually needs.
So I changed it. Instead of live, I had it sweep every sixty seconds: collect the activity, then report it in a batch once a minute. The numbers a human looks at do not need to be accurate to the millisecond, and that single change took an enormous load off my database.
Now, your situation will differ from mine, and I want to be clear about that:
The kind of site you are running determines which optimisations actually matter. There is no universal checklist. There is only "ask what your specific product is wasting, and stop wasting it."
Optimisation three: stop loading the whole world
The last one is the simplest and the most satisfying. I capped the results displayed at twenty, with a "load more" toggle underneath.
Before that, the platform was happily trying to load bottomless lists of results, draining people's data and slowing everything down, for content that almost nobody would ever scroll to. Because be honest with yourself: how many times in your life do you actually search past the first page of anything? You load the first sensible batch, and you let the rare, determined user ask for more. Everyone else gets a fast, light experience, and you get a cheaper, calmer system.
While we are here, this is also where the second question from last week quietly gets answered. People's email addresses are not identities to be displayed. An email is a private credential, not a public name tag. So as part of this same clean-up pass, you stop using emails as the thing you show on the front of the house, and you give people a proper username or display name instead. Common sense — but the kind that only becomes obvious once you go looking for waste and risk together.
Hands-on lab
The chapter above is the why. These guides are the how. The one rule never changes: if a step stumps you, screenshot it and paste it to your AI with "assume I have no technical experience; tell me exactly what to click next." Nothing here cannot be undone.
G4.1 · Run a full test pass with Claude [Core]
What you'll have: A systematic sweep that catches bugs before users do.
Before you start: Beginner · ongoing · free · you'll need a working app and a test account (G4.2)
- Ask Claude for a list of all pages in your app.
- For each page, ask for the list of functions and actions on it.
- Ask Claude to write a phased test plan covering those functions.
- Work the plan together, testing against your test account.
- After Claude's pass, test it yourself by hand on the live site, function by function.
- Test, fix, repeat until you are happy, not just tired.
Check you did it right: Every listed function behaves as intended.
If something looks off: Too much to test → prioritise the core journey first.
G4.2 · Create a safe test account for Claude to use [Core]
What you'll have: A way to let Claude test as a real user without exposing your personal credentials.
Before you start: Beginner · ~10 min · free · you'll need your auth working
- Create a dedicated test account on your platform with a fresh email and a unique password.
- Do not reuse a password you use anywhere else.
- Share only this test account's credentials with Claude for end-to-end testing.
- Disable or rotate it before launch if you like.
Check you did it right: Claude can log in and act as a normal user via the test account.
If something looks off: Just never use personal or reused passwords here.
G4.3 · Set image limits (count and file size) [Optional]
What you'll have: Protection against storage bloat and abuse.
Before you start: Beginner · ~30 min · free · you'll need an upload feature
- Decide your limits (for example, 5 photos per profile, 5MB per upload).
- Ask Claude to enforce a maximum number of images per profile.
- Ask it to reject oversized uploads with a friendly message.
Check you did it right: Exceeding the limits is blocked cleanly.
If something looks off: Legitimate large files rejected → adjust the cap to your real needs.
G4.4 · Convert and serve images as WebP [Optional]
What you'll have: Much smaller images, faster loads, lower bills.
Before you start: Beginner–Intermediate · ~1 hr · free · you'll need image uploads
- Ask Claude to convert and serve images as WebP (supported across browsers).
- Resize to screen-appropriate dimensions; no billboard resolutions for phone screens.
- HEIC is great for Apple and storage but does not display natively in most browsers, so use WebP for web delivery.
Check you did it right: Uploaded images are served as smaller WebP files and still look right.
If something looks off: Images not displaying → if you served HEIC to browsers, switch web delivery to WebP.
G4.5 · Batch your database calls (live to an interval sweep) [Advanced]
What you'll have: Big savings by not hammering your database in real time.
Before you start: Intermediate · 1–2 hrs · free · you'll need analytics or notification features
- Ask Claude to audit which calls are set to live or real-time.
- For things that do not need the millisecond (impressions, clicks, most notifications), switch to a periodic sweep — for example every 60 seconds — that batches and reports.
- Keep genuinely time-sensitive things live.
Check you did it right: Database load drops while metrics still update on the interval.
If something looks off: Something feels laggy that shouldn't → keep that specific call live.
G4.6 · Add pagination with a "load more" toggle [Optional]
What you'll have: Faster pages and less wasted data.
Before you start: Beginner · ~45 min · free · you'll need any list or feed
- Ask Claude to cap results at about 20 per load.
- Add a "load more" button for users who want more.
- Apply it to feeds, search results, and long lists.
Check you did it right: Lists load a fast first batch with a working "load more."
If something looks off: Important items hidden → tune the default sort order.
Do you have a product, or an expensive hobby?
So I finished all of this. Limited, compressed, batched, paginated, cleaned. And I sat back and thought: right, time to test once more. But this round was different. This time I was not hunting for broken buttons. I was simulating the real user experience, walking the full journey a stranger would walk, to answer the only question that actually matters.
Do I have a product? Or have I just been blowing money, fast, on a very elaborate hobby?
Look at everything tonight was about: saving space, saving tokens, saving database calls, saving your users' data. This whole chapter was about doing more with less, because less is what most of us start with.
That is exactly why I keep begging you not to do this alone. Africa cannot win this as ten thousand separate founders each burning their small savings on the same lessons in private. We move as an ecosystem or we move slowly. Some of us share hosting, some share tokens, and some of us just write down everything we learned the painful way so the next person does not have to bleed for it. That is what the AIStoryLab community is: the definitive how-tos, my token-saving prompt techniques, plain-language guides to every term I have thrown at you, and resources donated by builders walking your exact road.
What's next
You have a tested, optimised, genuinely lean platform now. Next comes the phase that taught me the deepest lesson of this whole journey: products are not simply made, they are iterated. You do not finish a product. You begin a relationship with it. Next time, we find out whether what you built is actually a product.