When I was trying to optimize the app's launch time, I found an interesting fact that the pre-main time needed on iPhone 6s is actually much longer than an iPhone 6 plus(warm launch).
On iPhone 6 plus, it looks like this:
Total pre-main time: 241.93 milliseconds (100.0%)
dylib loading time: 74.81 milliseconds (30.9%)
rebase/binding time: 15.96 milliseconds (6.6%)
ObjC setup time: 23.67 milliseconds (9.7%)
initializer time: 127.31 milliseconds (52.6%)
slowest intializers :
libSystem.B.dylib : 7.21 milliseconds (2.9%)
libBacktraceRecording.dylib : 5.97 milliseconds (2.4%)
AirshipKit : 5.17 milliseconds (2.1%)
My App : 199.60 milliseconds (82.5%)
However, on iPhone 6s, it tripled the time:
Total pre-main time: 891.80 milliseconds (100.0%)
dylib loading time: 680.36 milliseconds (76.2%)
rebase/binding time: 59.18 milliseconds (6.6%)
ObjC setup time: 42.74 milliseconds (4.7%)
initializer time: 109.43 milliseconds (12.2%)
slowest intializers :
libSystem.B.dylib : 7.36 milliseconds (0.8%)
My App : 147.96 milliseconds (16.5%)
They both are running on the same system(iOS 10.3). I think iPhone 6s have a larger RAM & better CPU than the 6 plus. But I don't understand why it's actually takes longer time to finish the pre-main task.
Can anyone give me some hints? Thanks!
P.S: I did try several times.