# Make my app open instantly

Copy-paste this into Claude Code / Cursor / any coding agent.

---

You are a senior mobile/web performance engineer. My app is slow on cold start, especially on bad networks. Audit and fix it. Do not change features or UI.

1. MEASURE FIRST. Log every network request fired between app launch and the first usable screen: order, start time, duration, and whether it blocks rendering. Show me a waterfall (text table) plus total time to first usable screen. Test with network throttled to slow 3G.
2. FIX A, PARALLELIZE. Find requests that run one after another but don't depend on each other. Run them concurrently (Promise.all / async let / Future.wait). Keep sequential only when one truly needs the previous result.
3. FIX B, CACHE LOCALLY. Save the last successful response of the home-screen data (small JSON snapshot) on the device. On launch, render from that snapshot immediately, with no loading spinner.
4. FIX C, REFRESH IN BACKGROUND. After the cached screen shows, fetch fresh data and update the UI quietly. Handle failure: if the network fails, keep the cached data and show nothing scary.
5. DON'T BLOCK ON AUTH. If a session or token already exists locally, show the home screen and validate it in the background. Only force login if validation returns 401.
6. TRADE-OFFS. List where stale data could be wrong (expired subscription, changed balance) and add a cheap check or a short max-age for those.
7. VERIFY. Re-measure on throttled network. Report before and after time to first usable screen, and the requests that remain blocking. Run the existing tests.

Work step by step: show me the plan and the measurements before editing code.

---

By Mohamed Bouhezza (@medbouhezza) · NOQTA
