DevPrep

All topics › Software architecture

How do you reduce launch time? What is pre-main?

Senior PRO

The point

Launch has two phases:

Separately: prewarming (iOS 15+) — the system may launch the process in advance and pause it after pre-main, so pre-main is already paid for at the "real" launch. This matters for measurement: the process uptime from ProcessInfo is not the time the user saw.

The rest of this answer, with code and interview follow-ups, is in the DevPrep app.

Read the full answer in DevPrep

Practice this before your interview

DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.

Get DevPrep on the App Store