Closed Bug 1392679 (iphone5c-perf) Opened 3 years ago Closed 1 year ago
Phone 5C app startup can be 20sec
See video showing 20 seconds until the UI is interactive. This is reproducible cold boot problem on iPhone 5C when booting to the history screen. I am signed in to sync.
https://blog.automatic.com/how-we-cut-our-ios-apps-launch-time-in-half-with-this-one-cool-trick-7aca2011e2ea might be relevant. See also Bug 1391837.
Bug 1387181 (DB ops on main thread) is contributor to this problem Attached is profile showing 5s along in a main-thread db block of code. That blog post looks highly anecdotal, profiling shows we are spending all our startup time in actual code, any app I have worked on has been the same.
Changing this into a meta bug for tracking all the individual bugs to work towards improving this.
The profile on this bug shows a full 5 seconds being spent in Activity Stream
Update from Slack: Garvan found that if we put a `fatalError` at the start of the app delegate, our splash screen stays on screen for 7.5 seconds. dyld logging says about 5 seconds. So his terrible 11-second startup is: 5.1 seconds dynamic linking 2.4 seconds other pre-main work (rebasing?) 4 seconds app startup (much of it in BVC) I think that implies that Comment 1 is relevant after all, and that we also need to work on early-stage startup app code.
Now that we have the AS off-main(Bug 1395265), we can look for the next hotspot. I am going to guess that dylib load time is relatively stable, and assume the remaining 15 sec was stuck in disk writes. When this bug was happening, I later saw I was down to near-zero disk space. So if we want to dig into this exact case more, we need to run in that state. My 5C is 8GB device, which the OS takes up nearly the entire storage, so it always runs with minimal free space.
(In reply to :garvan from comment #7) > When this bug was happening, I later saw I was down to near-zero disk space. > So if we want to dig into this exact case more, we need to run in that state. > > My 5C is 8GB device, which the OS takes up nearly the entire storage, so it > always runs with minimal free space. We might not want to use this as a target for profiling since it might artificially inflate the times in certain areas of the app if we end up thrashing I/O by aggressively swapping to disk. I think the 5C or SE might be a good baseline device for profiling, but we probably want to ensure that we at least have 500MB of free disk space.
Yeah, not for our baseline perf testing, but as part of stress testing (or would this be called a load test). Very possible to run iPhone with minimal free storage and let iCloud swap things and out to free up space.
Whiteboard: [perf] → [qf:p2:responsiveness]
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.