Aller au contenu

Prompts · @medbouhezza

Fais ouvrir ton app instantanément.

Un prompt prêt à coller dans ton agent de code. Il mesure d'abord, puis corrige le démarrage à froid : requêtes en parallèle, cache local, rafraîchissement en arrière-plan, auth non bloquante.

Claude Code · Cursor · tout agent de code

Télécharger le .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 étapes
  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.

Comment l’utiliser

  1. 01

    Copie

    Un clic, le prompt entier est dans ton presse-papiers.

  2. 02

    Colle

    Dans Claude Code, Cursor ou n’importe quel agent, à la racine de ton projet.

  3. 03

    Valide le plan

    L'agent te montre ses mesures et son plan avant de toucher au code. Relis-les.

Ton app est lente et tu veux qu'on s'en occupe ?

NOQTA audite et corrige les performances de ton produit, de la mesure à la mise en production.

Parler à NOQTA

Par Mohamed Bouhezza · NOQTA