Daily iOS
Performance and debugging

Instrumenting a 5 second screen load

The account detail screen in a banking app takes 5 seconds to first display. To avoid fixing on gut feeling, into which stages would you split and measure those 5 seconds?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Split the path from screen entry to first render into five stages, request preparation, network round trip, JSON decoding, local DB query, and view setup with first layout, mark each boundary with an OSSignposter interval, and see on the os_signpost track in Instruments which stage takes most of the 5 seconds. Break the network stage down further with URLSessionTaskMetrics into DNS, connection, server wait, and transfer.

Share a question