Journey SoundCloud had to undergo when improving the iOS launch times.
Pedalto theMetalEsteban Torres • Core Clients @ SoundCloud • @esttorhe
View Slide
Pedalto theMetal-AFTERMATHEsteban Torres • Core Clients @ SoundCloud • @esttorhe
Esteban Torres • Core Clients @ SoundCloud • @esttorhe
!Esteban Torres • Core Clients @ SoundCloud • @esttorhe
SequelEsteban Torres • Core Clients @ SoundCloud • @esttorhe
⾠Esteban Torres • Core Clients @ SoundCloud • @esttorhe
ContextEsteban Torres • Core Clients @ SoundCloud • @esttorhe
Planning@ SoundCloudEsteban Torres • Core Clients @ SoundCloud • @esttorhe
the betEsteban Torres • Core Clients @ SoundCloud • @esttorhe
ImproveiOSlaunch timeEsteban Torres • Core Clients @ SoundCloud • @esttorhe
iOS branchCore ClientsEsteban Torres • Core Clients @ SoundCloud • @esttorhe
ImpossibilityEsteban Torres • Core Clients @ SoundCloud • @esttorhe
Check the code1. Grab start timestamp2. Grab end timestamp3. Diff4. Multiply by a 10005. SendEsteban Torres • Core Clients @ SoundCloud • @esttorhe
Over5 secondsEsteban Torres • Core Clients @ SoundCloud • @esttorhe
7,000,000millisecondsEsteban Torres • Core Clients @ SoundCloud • @esttorhe
contextEsteban Torres • Core Clients @ SoundCloud • @esttorhe
App thenEsteban Torres • Core Clients @ SoundCloud • @esttorhe
App nowEsteban Torres • Core Clients @ SoundCloud • @esttorhe
morecontextEsteban Torres • Core Clients @ SoundCloud • @esttorhe
InstrumentsEsteban Torres • Core Clients @ SoundCloud • @esttorhe
1. Startup Operations2. ViewController4. Profit??Esteban Torres • Core Clients @ SoundCloud • @esttorhe
Main threadEsteban Torres • Core Clients @ SoundCloud • @esttorhe
How about thatViewControllerEsteban Torres • Core Clients @ SoundCloud • @esttorhe
even morecontextEsteban Torres • Core Clients @ SoundCloud • @esttorhe
Mirroring& youEsteban Torres • Core Clients @ SoundCloud • @esttorhe
⚡"Esteban Torres • Core Clients @ SoundCloud • @esttorhe
Whatnow !?Esteban Torres • Core Clients @ SoundCloud • @esttorhe
Total pre-main time: 2.0 seconds (100.0%)dylib loading time: 355.67 milliseconds (17.0%)rebase/binding time: 1.3 seconds (63.5%)ObjC setup time: 186.10 milliseconds (8.9%)initializer time: 218.53 milliseconds (10.4%)slowest intializers :libSystem.dylib : 5.52 milliseconds (0.2%) : 51.01 milliseconds (2.4%)MediaServices : 57.60 milliseconds (2.7%)SoundCloud : 182.43 milliseconds (8.7%)Esteban Torres • Core Clients @ SoundCloud • @esttorhe
EnterStatic FrameworksEsteban Torres • Core Clients @ SoundCloud • @esttorhe
Total pre-main time: 563.45 milliseconds (100.0%)dylib loading time: 111.39 milliseconds (19.7%)rebase/binding time: 151.48 milliseconds (26.8%)ObjC setup time: 148.33 milliseconds (26.3%)initializer time: 152.08 milliseconds (26.9%)slowest intializers :libSystem.dylib : 3.37 milliseconds (0.5%) : 46.06 milliseconds (8.1%)MediaServices : 25.92 milliseconds (4.6%)SoundCloud : 148.34 milliseconds (26.3%)Esteban Torres • Core Clients @ SoundCloud • @esttorhe
Resources&Static FrameworksEsteban Torres • Core Clients @ SoundCloud • @esttorhe
IncludingFrameworksEsteban Torres • Core Clients @ SoundCloud • @esttorhe
TakeawaysEsteban Torres • Core Clients @ SoundCloud • @esttorhe
1. Parallelize** Also with careEsteban Torres • Core Clients @ SoundCloud • @esttorhe
2. Instruments is your friendEsteban Torres • Core Clients @ SoundCloud • @esttorhe
3. Static Frameworks** Also with careEsteban Torres • Core Clients @ SoundCloud • @esttorhe
4. Assume no ill-intentionEsteban Torres • Core Clients @ SoundCloud • @esttorhe
Links· Automatic's blogpost about staticframeworks 1· Keith Smiley's LD python script 2· CocoaPods 1.5.0 release notes 33 http://blog.cocoapods.org/CocoaPods-1.5.0/2 https://github.com/keith/swi"-staticlibs1 https://blog.automatic.com/how-we-cut-our-ios-apps-launch-time-in-half-with-this-one-cool-trick-7aca2011e2eaEsteban Torres • Core Clients @ SoundCloud • @esttorhe
Xiè xiè· Github / Twitter@esttorhe- Mastodon@[email protected]Esteban Torres • Core Clients @ SoundCloud • @esttorhe
We arehiringEsteban Torres • Core Clients @ SoundCloud • @esttorhe
Xiè xièEsteban Torres • Core Clients @ SoundCloud • @esttorhe