Skip to content

Prompts · @medbouhezza

Make your app open instantly.

A copy-paste prompt for your coding agent. It measures first, then fixes cold start: parallel requests, a local cache, background refresh, and auth that never blocks the home screen.

Claude Code · Cursor · any coding agent

Download .md
make-my-app-open-instantly.md

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.

7 steps
  1. 01

    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. 02

    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. 03

    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. 04

    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. 05

    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. 06

    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. 07

    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.

How to use it

  1. 01

    Copy

    One click puts the whole prompt on your clipboard.

  2. 02

    Paste

    Into Claude Code, Cursor or any agent, at the root of your project.

  3. 03

    Review the plan

    The agent shows its measurements and plan before touching code. Read them.

App still slow, and you want it handled?

NOQTA audits and fixes product performance, from measurement to production.

Talk to NOQTA

By Mohamed Bouhezza · NOQTA