Dynamic libraries & frameworks slow down app launch a lot

Originator:fluidsonic
Number:rdar://22948371 Date Originated:2015-10-02
Status:Open Resolved:
Product:iOS Product Version:8.0 through 9.0.2
Classification:Performance Reproducible:always
 
Our app with 62 dynamic frameworks (73 binaries when including libSwift* and the app itself) suddenly takes 3-4 seconds to load on iOS 8 and 9.

Here our observations:
- Whenever we hit "pause" in the debugger during app start, we end up in ImageLoaderMachO::loadCodeSignature -> fcntl
- Device log is spammed with entries like this: amfid[…] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName] -> 73 times - surprise!
- Subsequent app starts are a lot faster. Obviously something is cached. The device log also no longer shows the entries above on app start.
- Few app starts later the cache seems to be purged. The app starts slow again, spams a lot in the device log and hangs in ImageLoaderMachO::loadCodeSignature most of the time.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!