But then again: How did this get so bad in the first place? I mean, yeah, premature optimization and stuff ... but ...
>One of the biggest immediate standouts was the time we spent on Swift protocol conformance checks (checking if a type conforms to a protocol), but why?
Correct: But why? Why would you do this in a static typed language? Conformance checks should be a rare exception.
>Architectural principles like the single responsibility principle, separation of concerns, and others, are key to how we write code at DoorDash.
Oh, OK, architecture astronautics at play, I guess. Sorry, but you can separate concerns and all that other stuff without ending up with what looks like a dynamic typing system.
/rant (I'm hungry)
“It’s not slow enough to make someone give up” isn’t a performance metric that puts your users first.
According to a talk I found [here](https://developer.apple.com/videos/play/wwdc2019/423/): there are three types of launches; cold, warm, and hot. Warm is what's typically profiled and occurs when the app has been run at least once but has been closed since, while hot launches are what occur when bringing an app to the foreground. I assume warm launches are what are being profiled.
I don't have any statistics, but my observation is that most people do not exit out of apps and instead just background them, which suggests warm launches are relatively rare if my understanding of which state triggers which type of launch is correct.
Is this not the job of your performance team?
Granted the 100ms section included System Interface - DYLD3 (dynamic linking) as part of it, which includes the 200ms portion that was optimized in tfa so I don't know how accurate that 100-300 breakup is.
The talk also says to avoid dynamic library loading during launch to improve time which is interesting, as it suggests there's an alternative, which may or may not be what Doordash did here.
The DoorDash app is feature stable as far as I can tell as an infrequent user. It makes sense to have the team invest into small optimizations for experience and speed. Much better than letting idle hands start redesigning things that aren’t broken or doing new features for the sake of doing more things.
Also, a 600ms launch time on a high-end phone could be a 5s launch time for someone using a cheap, old phone. Optimizations are most noticed by the lower end of your userbase’s hardware.
This is a very MBA take. Task priority should always be considered beforehand, but whenever there is some leeway (including "20% time") I contend that performance tasks should be given some preference. There is almost no end to the ill effects of slow software.
For example, if response time is less than 0.1 sec, whatever the user is doing is "interactive" and does not disrupt the flow of the task.
I remember there were similar statistics for web page response time (number of lost views as response time increased). These seem like they might be similar to app launch speed.
That said, I wonder if this "ios spp launch time" post was something that management pursued in a data-driven way, or some engineer getting annoyed and scratching an itch (or something in the middle)
If the flame graph extends over the entire startup time, then I'd estimate it to be around 600-700ms (wish they gave the numbers rather than the percentage) which already sounds very nice as a user. If it was like 5 seconds then it would be amazing.
Furthermore, I'm assuming that this only affects when the app is initially started instead of when it is already running in the background or navigating between screens, which is why I feel the linked article on why latency matters in tfa doesn't really support it.
I'm curious about what metrics mobile developers use to prioritize tasks.