iOS App Cold Launch Latency Reduction Plan
Plan a systematic audit and performance optimization effort to reduce iOS cold launch time.
Use this template when an iOS application suffers from slow cold start times, high dylib load overhead, or blocked main threads during app launch. It establishes a diagnostic and remediation plan focused on measurable TTID and TTFI milestones.
Role: Senior iOS Performance and Runtime Systems Engineer specializing in dyld, launch profiling, and main-thread lifecycle optimization.
Context
- Current Measured Cold Launch Time: {{current_launch_time_ms}}
- Target Cold Launch Budget: {{target_launch_budget_ms}}
- Dynamic Framework & Binary Setup: {{binary_structure_and_dylibs}}
- Main Thread Initialization Tasks: {{launch_blocking_initializers}}
- Primary Profiling / Metrics Tooling: {{performance_tooling}}
Task
Create a tactical launch-time reduction plan to decrease cold launch duration from {{current_launch_time_ms}} to {{target_launch_budget_ms}}, systematically addressing dyld overhead, initializer bottlenecks in {{launch_blocking_initializers}}, and dynamic linking in {{binary_structure_and_dylibs}}.
Method
- Establish a standardized, reproducible measurement baseline using {{performance_tooling}} on physical reference devices.
- Dissect pre-main execution phases, calculating dyld dynamic loader cost, dylib rebasing, and Objective-C runtime static initialization (
+load/ static initializers). - Analyze
didFinishLaunchingWithOptionsandscene(_:willConnectTo:options:)execution, cataloging every service initialized in {{launch_blocking_initializers}}. - Re-architect blocking services into asynchronous, lazy, or post-first-frame background initialization sequences.
- Consolidate dynamic dependencies in {{binary_structure_and_dylibs}} via static linking or mergeable libraries (
-make_mergeable). - Optimize view hierarchy instantiation and initial frame rendering for Time-to-Initial-Display (TTID) and Time-to-Full-Interaction (TTFI).
- Formulate a CI performance gate to detect and prevent launch time regressions during future pull requests.
Constraints
- MUST prioritize optimizations that reduce main-thread blocking before the first UI frame.
- MUST NOT defer critical security, crash reporting, or compliance initializers past user authentication.
- Target cold launch must strictly satisfy {{target_launch_budget_ms}} under worst-case thermal throttling conditions.
- Output must focus purely on Apple runtime internals and Xcode optimization capabilities.
Output format
Provide the performance plan organized into:
- Launch Phase Breakdown & Bottleneck Hypotheses (pre-main vs. post-main)
- Immediate Remediation Actions (ranked by impact vs. effort)
- Structural Architecture Adjustments (binary consolidation, lazy initialization)
- Monitoring & CI Regression Guardrails (telemetry thresholds) Target length: 450 to 750 words.
Self-review
- Does the plan address both pre-main (dyld, static initializers) and post-main lifecycle bottlenecks?
- Are all critical safety and diagnostic services safely accounted for without breaking launch integrity?
- Is the target budget {{target_launch_budget_ms}} directly addressable by the proposed engineering steps?
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.