# Diagnose slow launches and API cold starts in my mobile app

A codebase-specific diagnosis of startup time, serverless cold starts, and network waste, with fixes ranked by impact on perceived speed.

- Topic: Software Development
- Framework: Few-Shot
- Level: Standard
- Tags: Coding, Design, Analyze, Code, Fill-in Template
- Source: https://www.thinkwithprompt.com/prompts/diagnose-slow-launches-and-api-cold-starts-in-my-mobile-app

## Prompt

```text
Analyze why my mobile app feels slow and rank what to fix. This is a diagnosis, not a refactor - do not rewrite code unless I ask.

**App stack:** [e.g. "Expo / React Native", "Flutter", "native iOS"]
**Backend:** [e.g. "Supabase Edge Functions", "AWS Lambda", "Firebase Cloud Functions"]
**Symptoms:** [e.g. "first screen takes 4s", "first API call after idle is slow", "lists stutter"]
**Measurements I have:** [timings, traces, logs - or "none yet"]
**Code:** [PASTE app startup code, data-fetching layer, key screens, and the serverless functions they call]

Check specifically:
1. **App startup** - work done before first render, bundle size, eager imports, font/asset loading, splash screen timing.
2. **Cold starts** - function bundle size and dependencies, initialization at module scope, database client creation per request, region distance from users, whether functions are called in sequence on launch.
3. **Network** - request waterfalls, chatty endpoints that could be batched, over-fetching, missing caching, no retry/timeout handling on poor mobile connections.
4. **Perceived performance** - missing skeletons or optimistic UI, blocking spinners, data that could be prefetched or cached locally.
5. **Rendering** - unnecessary re-renders, heavy lists without virtualization, large images.

Base every finding on the code I shared; where you would need a measurement to confirm, say so and tell me how to measure it.

Return a table: Issue | Evidence in the code | Likely impact (high/med/low) | Fix | Effort. Then a top-3 action list and a short plan to measure before and after.
```

## What to fill in

- e.g. "Expo / React Native", "Flutter", "native iOS"
- timings, traces, logs - or "none yet"

Free to copy and use. From ThinkWithPrompt (https://www.thinkwithprompt.com/), a library of 2,663 curated AI prompts.
