SlideShare a Scribd company logo
1 of 32
MAKE YOUR PROJECT
GREAT AGAIN
Oleksii Lyzenko 2018
WHAT WE ARE GONNA COVER
• Look at app loading process
• Application start time measurements
• Discuss basic virtual memory principles
• Speak about static and dynamic libraries
• Look at Xcode compilation flags
WHAT YOU SHOULD EXPECT
• Decrease application start time
• Improve Xcode responsiveness
• ???
• Get smarter !(also not bad)
WATCH DOG
• System will terminate your app if you
will exit watch dog timeouts
• User will quit your app before timeout
• Recommended launch time: 400ms
Scenario Timeout
Launch 20 sec
Resume 10 sec
Suspend 10 sec
Quit 6 sec
Background task 10 min
APP LOADING
• exec()
• Load application into memory
• Load dylibs
• Rebase & bind
• Obj-C runtime setup
• Initializers
• main()
• applicationWillFinishLaunching()
• Restore state
• applicationDidFinishLaunching()
• viewDidAppear()
PRE-MAIN TIME
• You can not measure pre-main time from inside of your app :(
• But in iOS 9 we got a new flag: DYLD_PRINT_STATISTICS
PRE-MAIN TIME
• Console log:
PRE-MAIN TIME
We can automate measurement with libimobiledevice:
• ideviceinstaller to install app
• idevicedebug to launch
COLD ❄ -VS- 🔥 HOT
• Hot start
• Cold Start
SWIFT
Apple told us that Swift is Fun & Fast &Furious
Looks like nothing to worry about
• No so easy :(
SWIFT COMES TO PLAY
• Empty project: Objective-C
• Empty Project: Swift
SWIFT COMES TO PLAY
• Swift has no binary compatibility
• Each Swift version has it’s own runtime
• Each app contains own dynamic swift libraries
• This are Swift runtime & system lib wrappers
• Should be fixed in Swift 4? 5? 6? 7?
• Specific Swift libraries in empty project
App
Dyld
ZERO_PAGE
APPLICATION LOADING
• Leave 4GB ZERO_PAGE (64bit system)
• System maps you application into memory
• Address Space Layout Randomization (ASLR)
• Loads & launches dynamic loader (dyld)
• dyld resolves and loads all dylibs
• dylibs might require other dylibs
• dylibs require core signing check
• Perform rebasing (adjust pointers inside image)
• Perform binding (adjust pointers outside image)
• Setup Obj-C runtime
• Initialize
Virtual Memory
Space
0x0
0x???000 (random)
A.dylib
B.dylib
ZZZ.dylib
. . .
Check WWDC 2016: Optimizing App Startup Time (session 406)
APPLICATION LOADING
• Usually app “contains” up to 400+ dylibs
• Empty app will “contains” 150+ dylibs
• How just 12 Swift libraries dropped performance so dramatically?
VIRTUAL MEMORY
Virtual Memory is a level of indirection
• Physical RAM pages addressed to virtual app pages
• Same RAM page can appear in multiple processes
• Page fault
• File backed pages
• mmap()
• lazy reading
• Copy-On-Write (COW)
• Dirty vs. clean pages
• Permissions: rwx
AppA AppBA.dylib
B.dylib YYY.dylib
ZZZ.dylib
AppA
A.dylib
B.dylib YYY.dylib
ZZZ.dylib
VIRTUAL MEMORY AND SHARED LIBRARIES
Virtual Memory
(App A)
Virtual Memory
(App B)
AppB
Real Memory
File system
AppB
YYY.dylib
AppA
A.dylib
B.dylib
ZZZ.dylib
A.dylib
B.dylib
Same
LIBRARIES FLAVOROUS
We should distinguish next libraries:
• System dynamic libraries (very optimized, stored in shared library caches)
• Third-party dynamic libraries
• Static libraries
STATIC LIBRARY
• Resolved in compile time
• Loads fast with main binary
• Can not contain resources (it’s just code)
AppA
A
B

ZZZ
DYNAMIC LIBRARIES (FRAMEWORKS)
• Resolved in runtime
• Can be shared between processes
• System frameworks
• App extensions
• Can be lazy loaded in runtime
• Can support versioning (frameworks)
• Can contain resources (frameworks)
AppA
A.dylib
B.dylib
ZZZ.framework
ZZZ.dylib
resources
LIBRARIES FLAVOROUS: CONCLUSION
• System dynamic libraries — fast, super easy to use
• Third-party dynamic libraries — slow, easy to use
• Static libraries — fastest, but you should pay attention
APP LOADING (AGAIN)
• exec()
• Load application into memory
• Load dylibs
• Rebase & bind
• Obj-C runtime setup
• Initializers
• main()
APP LOADING IMPROVEMENTS
• Reduce dynamic libraries count
• Reduce Obj-C usage (if Obj-C runtime phase is a problem)
• Avoid initializations on start:
• use + initialize instead of +load
• refactor static C++ objects
• FYI: Swift’s `static let` is lazy (Cool!)
REDUCE DYNAMIC LIBRARIES COUNT
• Cleanup codebase and remove duplicated libraries
• Avoid “one file” libraries (plenty of them in cocoapods)
• Use lazy loading with dlopen()
• Put library as sources
• Switch to static libraries…
STATIC LIBRARIES
• Static libraries are not allowed in Swift!!!
• Static libraries are allowed in Swift starting from Xcode 9.0
(stable work from Xcode 9.4)
DEPENDENCY MANAGERS
• Cocoapods
• Carthage
• Swift Package Manager
• Submodules and your own hands 🤲
• All of them have (basic) static libraries support
STATIC LIBRARIES: CONCLUSION
• We able to reduce app start time in several times
• Requires dependency manager support (and framework podspec update)
• Minor code changes (relative to other approaches)
• If framework contains resources you should move them to bundle by yourself
XCODE
• In Objective-C/C++/C-style:
• Hide all private content in .m/.cpp/.c file
• Expose in .h only what is absolutely necessary
• Write #import only when you need it
• Write @class (forward declaration) in headers if possible
• etc.
• Swift-style:
• Don’t care, I will do it all by myself!!!11one
SWIFT COMPILATION MODES
• Whole-module
-wmo, -whole-module-optimization,
-force-single-frontend-invocation
A.Swift
App
B.swift
Frontend Job
C.swift A.Swift B.swift
Frontend
Job
C.swift
Frontend
Job
Frontend
Job
• Primary-file
Linker
App
Linker
Read and compile target file
Read for metainformation
Swift’s Github, Compiler Performance
XCODE MODULES
• Apple recommends to use Modules
• Now it’s possible to use Modules as static or dynamic libraries
• Good Modules breakdown can:
• Improve code decoupling
• Give some hints to compiler
• Give great performance boost for primary-file mode
ACTION POINTS
• Check you app start time
• Automate this process (CI) and collect statistic
• Determine bottlenecks and fix them
• Check your project’s dependencies, remove what possible
• You can move some libraries to static one
• Breakdown your project to modules
FURTHER READING
• WWDC 2016: Optimizing App Startup Time (session 406)
• WWDC 2012: iOS App Performance: Responsiveness (session 235)
• Jonathan Levin, Mac OSX® And iOS Internals, John Wiley & Sons, Inc, 2013 (this one is
sooooo goooood! And it’s available for free)
• Apple’s Dynamic Library Programming Topics
• Apple’s Memory Usage Performance Guidelines (About the Virtual Memory System)
• Xcode 9 Release Notes
• Swift’s Github, Compiler Performance
• https://github.com/libimobiledevice/libimobiledevice
Q&A
Oleksii Lyzenko 2018

More Related Content

What's hot

Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
Getting started with Apache Camel - Javagruppen Copenhagen - April 2014Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
Getting started with Apache Camel - Javagruppen Copenhagen - April 2014Claus Ibsen
 
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014Claus Ibsen
 
OpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - JesseOpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - JesseJesse Gallagher
 
Getting Started with Apache Camel - Devconf Conference - February 2013
Getting Started with Apache Camel - Devconf Conference - February 2013Getting Started with Apache Camel - Devconf Conference - February 2013
Getting Started with Apache Camel - Devconf Conference - February 2013Claus Ibsen
 
Laravel introduction
Laravel introductionLaravel introduction
Laravel introductionSimon Funk
 
Getting started with Apache Camel - May 2013
Getting started with Apache Camel - May 2013Getting started with Apache Camel - May 2013
Getting started with Apache Camel - May 2013Claus Ibsen
 
Knowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkKnowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkBukhori Aqid
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingRami Sayar
 
Actors Set the Stage for Project Orleans
Actors Set the Stage for Project OrleansActors Set the Stage for Project Orleans
Actors Set the Stage for Project Orleanscjmyers
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS DebuggingRami Sayar
 
Getting Started with Apache Camel - Malmo JUG - March 2013
Getting Started with Apache Camel - Malmo JUG - March 2013Getting Started with Apache Camel - Malmo JUG - March 2013
Getting Started with Apache Camel - Malmo JUG - March 2013Claus Ibsen
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Dilouar Hossain
 
Machine Learning Platform in LINE Fukuoka
Machine Learning Platform in LINE FukuokaMachine Learning Platform in LINE Fukuoka
Machine Learning Platform in LINE FukuokaLINE Corporation
 
Laravel 5 New Features
Laravel 5 New FeaturesLaravel 5 New Features
Laravel 5 New FeaturesJoe Ferguson
 
Getting Started with Apache Camel at DevNation 2014
Getting Started with Apache Camel at DevNation 2014Getting Started with Apache Camel at DevNation 2014
Getting Started with Apache Camel at DevNation 2014Claus Ibsen
 
Digpen 7: Why choose Laravel?
Digpen 7: Why choose Laravel?Digpen 7: Why choose Laravel?
Digpen 7: Why choose Laravel?John Blackmore
 
Project Orleans - Actor Model framework
Project Orleans - Actor Model frameworkProject Orleans - Actor Model framework
Project Orleans - Actor Model frameworkNeil Mackenzie
 
Integration using Apache Camel and Groovy
Integration using Apache Camel and GroovyIntegration using Apache Camel and Groovy
Integration using Apache Camel and GroovyClaus Ibsen
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Viral Solani
 

What's hot (20)

Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
Getting started with Apache Camel - Javagruppen Copenhagen - April 2014Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
Getting started with Apache Camel - Javagruppen Copenhagen - April 2014
 
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
Getting started with Apache Camel presentation at BarcelonaJUG, january 2014
 
OpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - JesseOpenNTF Webinar May 2021 - Jesse
OpenNTF Webinar May 2021 - Jesse
 
Getting Started with Apache Camel - Devconf Conference - February 2013
Getting Started with Apache Camel - Devconf Conference - February 2013Getting Started with Apache Camel - Devconf Conference - February 2013
Getting Started with Apache Camel - Devconf Conference - February 2013
 
Laravel introduction
Laravel introductionLaravel introduction
Laravel introduction
 
Agile sites311training
Agile sites311trainingAgile sites311training
Agile sites311training
 
Getting started with Apache Camel - May 2013
Getting started with Apache Camel - May 2013Getting started with Apache Camel - May 2013
Getting started with Apache Camel - May 2013
 
Knowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkKnowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP framework
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript Debugging
 
Actors Set the Stage for Project Orleans
Actors Set the Stage for Project OrleansActors Set the Stage for Project Orleans
Actors Set the Stage for Project Orleans
 
Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
 
Getting Started with Apache Camel - Malmo JUG - March 2013
Getting Started with Apache Camel - Malmo JUG - March 2013Getting Started with Apache Camel - Malmo JUG - March 2013
Getting Started with Apache Camel - Malmo JUG - March 2013
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
 
Machine Learning Platform in LINE Fukuoka
Machine Learning Platform in LINE FukuokaMachine Learning Platform in LINE Fukuoka
Machine Learning Platform in LINE Fukuoka
 
Laravel 5 New Features
Laravel 5 New FeaturesLaravel 5 New Features
Laravel 5 New Features
 
Getting Started with Apache Camel at DevNation 2014
Getting Started with Apache Camel at DevNation 2014Getting Started with Apache Camel at DevNation 2014
Getting Started with Apache Camel at DevNation 2014
 
Digpen 7: Why choose Laravel?
Digpen 7: Why choose Laravel?Digpen 7: Why choose Laravel?
Digpen 7: Why choose Laravel?
 
Project Orleans - Actor Model framework
Project Orleans - Actor Model frameworkProject Orleans - Actor Model framework
Project Orleans - Actor Model framework
 
Integration using Apache Camel and Groovy
Integration using Apache Camel and GroovyIntegration using Apache Camel and Groovy
Integration using Apache Camel and Groovy
 
Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)Introduction to Laravel Framework (5.2)
Introduction to Laravel Framework (5.2)
 

Similar to Mobile Fest 2018. Алексей Лизенко. Make your project great again

iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application SecurityEgor Tolstoy
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache CordovaIvano Malavolta
 
Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyondrsebbe
 
OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012Steven Pousty
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applicationsJulien Dubois
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...Gaetano Giunta
 
Workflow Engines for Hadoop
Workflow Engines for HadoopWorkflow Engines for Hadoop
Workflow Engines for HadoopJoe Crobak
 
CocoaConf DC - Automate with Swift - Tony Ingraldi
CocoaConf DC -  Automate with Swift - Tony IngraldiCocoaConf DC -  Automate with Swift - Tony Ingraldi
CocoaConf DC - Automate with Swift - Tony IngraldiTony Ingraldi
 
Writing Better Haskell
Writing Better HaskellWriting Better Haskell
Writing Better Haskellnkpart
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesAndy_Gaskell
 
Docker crash course
Docker crash courseDocker crash course
Docker crash coursenispas
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy VirinCocoaHeads France
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerAlan Forbes
 

Similar to Mobile Fest 2018. Алексей Лизенко. Make your project great again (20)

iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
 
iOS Application Exploitation
iOS Application ExploitationiOS Application Exploitation
iOS Application Exploitation
 
The Architect Way
The Architect WayThe Architect Way
The Architect Way
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
Xcode, Basics and Beyond
Xcode, Basics and BeyondXcode, Basics and Beyond
Xcode, Basics and Beyond
 
OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
 
Workflow Engines for Hadoop
Workflow Engines for HadoopWorkflow Engines for Hadoop
Workflow Engines for Hadoop
 
CocoaConf DC - Automate with Swift - Tony Ingraldi
CocoaConf DC -  Automate with Swift - Tony IngraldiCocoaConf DC -  Automate with Swift - Tony Ingraldi
CocoaConf DC - Automate with Swift - Tony Ingraldi
 
Ios development
Ios developmentIos development
Ios development
 
The ABC's of IaC
The ABC's of IaCThe ABC's of IaC
The ABC's of IaC
 
Titanium Alloy Tutorial
Titanium Alloy TutorialTitanium Alloy Tutorial
Titanium Alloy Tutorial
 
Writing Better Haskell
Writing Better HaskellWriting Better Haskell
Writing Better Haskell
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
 
Docker crash course
Docker crash courseDocker crash course
Docker crash course
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy Virin
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 

More from MobileFest2018

Mobile Fest 2018. Enrique López Mañas. TensorFlow for Mobile Poets
Mobile Fest 2018. Enrique López Mañas. TensorFlow for Mobile PoetsMobile Fest 2018. Enrique López Mañas. TensorFlow for Mobile Poets
Mobile Fest 2018. Enrique López Mañas. TensorFlow for Mobile PoetsMobileFest2018
 
Mobile Fest 2018. Łukasz Mróz. Let’s make your DATA sexy
Mobile Fest 2018. Łukasz Mróz. Let’s make your DATA sexyMobile Fest 2018. Łukasz Mróz. Let’s make your DATA sexy
Mobile Fest 2018. Łukasz Mróz. Let’s make your DATA sexyMobileFest2018
 
Mobile Fest 2018. Алексей Демедецкий. Отладка с архитектурой Redux на iOS
Mobile Fest 2018. Алексей Демедецкий. Отладка с архитектурой Redux на iOSMobile Fest 2018. Алексей Демедецкий. Отладка с архитектурой Redux на iOS
Mobile Fest 2018. Алексей Демедецкий. Отладка с архитектурой Redux на iOSMobileFest2018
 
Mobile Fest 2018. Илья Иванов. Как React-Native перевернул наше представление...
Mobile Fest 2018. Илья Иванов. Как React-Native перевернул наше представление...Mobile Fest 2018. Илья Иванов. Как React-Native перевернул наше представление...
Mobile Fest 2018. Илья Иванов. Как React-Native перевернул наше представление...MobileFest2018
 
Mobile Fest 2018. Владимир Бондаренко. Почему переход с Apache Cordova на Rea...
Mobile Fest 2018. Владимир Бондаренко. Почему переход с Apache Cordova на Rea...Mobile Fest 2018. Владимир Бондаренко. Почему переход с Apache Cordova на Rea...
Mobile Fest 2018. Владимир Бондаренко. Почему переход с Apache Cordova на Rea...MobileFest2018
 
Mobile Fest 2018. Yonatan Levin. WTF with Android Background Restrictions
Mobile Fest 2018. Yonatan Levin. WTF with Android Background RestrictionsMobile Fest 2018. Yonatan Levin. WTF with Android Background Restrictions
Mobile Fest 2018. Yonatan Levin. WTF with Android Background RestrictionsMobileFest2018
 
Mobile Fest 2018. Артем Гетьман. Архитектура обработки ошибок: чистый, быстры...
Mobile Fest 2018. Артем Гетьман. Архитектура обработки ошибок: чистый, быстры...Mobile Fest 2018. Артем Гетьман. Архитектура обработки ошибок: чистый, быстры...
Mobile Fest 2018. Артем Гетьман. Архитектура обработки ошибок: чистый, быстры...MobileFest2018
 
Mobile Fest 2018. Кирилл Розов. Insert Koin
Mobile Fest 2018. Кирилл Розов. Insert KoinMobile Fest 2018. Кирилл Розов. Insert Koin
Mobile Fest 2018. Кирилл Розов. Insert KoinMobileFest2018
 
Mobile Fest 2018. Алеся Подлесная. UX в разработке мобильных приложений
Mobile Fest 2018. Алеся Подлесная. UX в разработке мобильных приложенийMobile Fest 2018. Алеся Подлесная. UX в разработке мобильных приложений
Mobile Fest 2018. Алеся Подлесная. UX в разработке мобильных приложенийMobileFest2018
 
Mobile Fest 2018. Александр Сергиенко. Flutter - что за зверь такой?
Mobile Fest 2018. Александр Сергиенко. Flutter - что за зверь такой?Mobile Fest 2018. Александр Сергиенко. Flutter - что за зверь такой?
Mobile Fest 2018. Александр Сергиенко. Flutter - что за зверь такой?MobileFest2018
 
Mobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threading
Mobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threadingMobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threading
Mobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threadingMobileFest2018
 
Mobile Fest 2018. Håvard Hvassing. Working with sharp tools — continuous inte...
Mobile Fest 2018. Håvard Hvassing. Working with sharp tools — continuous inte...Mobile Fest 2018. Håvard Hvassing. Working with sharp tools — continuous inte...
Mobile Fest 2018. Håvard Hvassing. Working with sharp tools — continuous inte...MobileFest2018
 
Mobile Fest 2018. Александр Корин. Болеутоляющее
Mobile Fest 2018. Александр Корин. БолеутоляющееMobile Fest 2018. Александр Корин. Болеутоляющее
Mobile Fest 2018. Александр Корин. БолеутоляющееMobileFest2018
 

More from MobileFest2018 (13)

Mobile Fest 2018. Enrique López Mañas. TensorFlow for Mobile Poets
Mobile Fest 2018. Enrique López Mañas. TensorFlow for Mobile PoetsMobile Fest 2018. Enrique López Mañas. TensorFlow for Mobile Poets
Mobile Fest 2018. Enrique López Mañas. TensorFlow for Mobile Poets
 
Mobile Fest 2018. Łukasz Mróz. Let’s make your DATA sexy
Mobile Fest 2018. Łukasz Mróz. Let’s make your DATA sexyMobile Fest 2018. Łukasz Mróz. Let’s make your DATA sexy
Mobile Fest 2018. Łukasz Mróz. Let’s make your DATA sexy
 
Mobile Fest 2018. Алексей Демедецкий. Отладка с архитектурой Redux на iOS
Mobile Fest 2018. Алексей Демедецкий. Отладка с архитектурой Redux на iOSMobile Fest 2018. Алексей Демедецкий. Отладка с архитектурой Redux на iOS
Mobile Fest 2018. Алексей Демедецкий. Отладка с архитектурой Redux на iOS
 
Mobile Fest 2018. Илья Иванов. Как React-Native перевернул наше представление...
Mobile Fest 2018. Илья Иванов. Как React-Native перевернул наше представление...Mobile Fest 2018. Илья Иванов. Как React-Native перевернул наше представление...
Mobile Fest 2018. Илья Иванов. Как React-Native перевернул наше представление...
 
Mobile Fest 2018. Владимир Бондаренко. Почему переход с Apache Cordova на Rea...
Mobile Fest 2018. Владимир Бондаренко. Почему переход с Apache Cordova на Rea...Mobile Fest 2018. Владимир Бондаренко. Почему переход с Apache Cordova на Rea...
Mobile Fest 2018. Владимир Бондаренко. Почему переход с Apache Cordova на Rea...
 
Mobile Fest 2018. Yonatan Levin. WTF with Android Background Restrictions
Mobile Fest 2018. Yonatan Levin. WTF with Android Background RestrictionsMobile Fest 2018. Yonatan Levin. WTF with Android Background Restrictions
Mobile Fest 2018. Yonatan Levin. WTF with Android Background Restrictions
 
Mobile Fest 2018. Артем Гетьман. Архитектура обработки ошибок: чистый, быстры...
Mobile Fest 2018. Артем Гетьман. Архитектура обработки ошибок: чистый, быстры...Mobile Fest 2018. Артем Гетьман. Архитектура обработки ошибок: чистый, быстры...
Mobile Fest 2018. Артем Гетьман. Архитектура обработки ошибок: чистый, быстры...
 
Mobile Fest 2018. Кирилл Розов. Insert Koin
Mobile Fest 2018. Кирилл Розов. Insert KoinMobile Fest 2018. Кирилл Розов. Insert Koin
Mobile Fest 2018. Кирилл Розов. Insert Koin
 
Mobile Fest 2018. Алеся Подлесная. UX в разработке мобильных приложений
Mobile Fest 2018. Алеся Подлесная. UX в разработке мобильных приложенийMobile Fest 2018. Алеся Подлесная. UX в разработке мобильных приложений
Mobile Fest 2018. Алеся Подлесная. UX в разработке мобильных приложений
 
Mobile Fest 2018. Александр Сергиенко. Flutter - что за зверь такой?
Mobile Fest 2018. Александр Сергиенко. Flutter - что за зверь такой?Mobile Fest 2018. Александр Сергиенко. Flutter - что за зверь такой?
Mobile Fest 2018. Александр Сергиенко. Flutter - что за зверь такой?
 
Mobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threading
Mobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threadingMobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threading
Mobile Fest 2018. Fernando Cejas. What Mom Never Told You About Multi-threading
 
Mobile Fest 2018. Håvard Hvassing. Working with sharp tools — continuous inte...
Mobile Fest 2018. Håvard Hvassing. Working with sharp tools — continuous inte...Mobile Fest 2018. Håvard Hvassing. Working with sharp tools — continuous inte...
Mobile Fest 2018. Håvard Hvassing. Working with sharp tools — continuous inte...
 
Mobile Fest 2018. Александр Корин. Болеутоляющее
Mobile Fest 2018. Александр Корин. БолеутоляющееMobile Fest 2018. Александр Корин. Болеутоляющее
Mobile Fest 2018. Александр Корин. Болеутоляющее
 

Recently uploaded

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 

Recently uploaded (20)

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 

Mobile Fest 2018. Алексей Лизенко. Make your project great again

  • 1. MAKE YOUR PROJECT GREAT AGAIN Oleksii Lyzenko 2018
  • 2. WHAT WE ARE GONNA COVER • Look at app loading process • Application start time measurements • Discuss basic virtual memory principles • Speak about static and dynamic libraries • Look at Xcode compilation flags
  • 3. WHAT YOU SHOULD EXPECT • Decrease application start time • Improve Xcode responsiveness • ??? • Get smarter !(also not bad)
  • 4. WATCH DOG • System will terminate your app if you will exit watch dog timeouts • User will quit your app before timeout • Recommended launch time: 400ms Scenario Timeout Launch 20 sec Resume 10 sec Suspend 10 sec Quit 6 sec Background task 10 min
  • 5. APP LOADING • exec() • Load application into memory • Load dylibs • Rebase & bind • Obj-C runtime setup • Initializers • main() • applicationWillFinishLaunching() • Restore state • applicationDidFinishLaunching() • viewDidAppear()
  • 6. PRE-MAIN TIME • You can not measure pre-main time from inside of your app :( • But in iOS 9 we got a new flag: DYLD_PRINT_STATISTICS
  • 8. PRE-MAIN TIME We can automate measurement with libimobiledevice: • ideviceinstaller to install app • idevicedebug to launch
  • 9. COLD ❄ -VS- 🔥 HOT • Hot start • Cold Start
  • 10. SWIFT Apple told us that Swift is Fun & Fast &Furious Looks like nothing to worry about • No so easy :(
  • 11. SWIFT COMES TO PLAY • Empty project: Objective-C • Empty Project: Swift
  • 12. SWIFT COMES TO PLAY • Swift has no binary compatibility • Each Swift version has it’s own runtime • Each app contains own dynamic swift libraries • This are Swift runtime & system lib wrappers • Should be fixed in Swift 4? 5? 6? 7? • Specific Swift libraries in empty project
  • 13. App Dyld ZERO_PAGE APPLICATION LOADING • Leave 4GB ZERO_PAGE (64bit system) • System maps you application into memory • Address Space Layout Randomization (ASLR) • Loads & launches dynamic loader (dyld) • dyld resolves and loads all dylibs • dylibs might require other dylibs • dylibs require core signing check • Perform rebasing (adjust pointers inside image) • Perform binding (adjust pointers outside image) • Setup Obj-C runtime • Initialize Virtual Memory Space 0x0 0x???000 (random) A.dylib B.dylib ZZZ.dylib . . . Check WWDC 2016: Optimizing App Startup Time (session 406)
  • 14. APPLICATION LOADING • Usually app “contains” up to 400+ dylibs • Empty app will “contains” 150+ dylibs • How just 12 Swift libraries dropped performance so dramatically?
  • 15. VIRTUAL MEMORY Virtual Memory is a level of indirection • Physical RAM pages addressed to virtual app pages • Same RAM page can appear in multiple processes • Page fault • File backed pages • mmap() • lazy reading • Copy-On-Write (COW) • Dirty vs. clean pages • Permissions: rwx
  • 16. AppA AppBA.dylib B.dylib YYY.dylib ZZZ.dylib AppA A.dylib B.dylib YYY.dylib ZZZ.dylib VIRTUAL MEMORY AND SHARED LIBRARIES Virtual Memory (App A) Virtual Memory (App B) AppB Real Memory File system AppB YYY.dylib AppA A.dylib B.dylib ZZZ.dylib A.dylib B.dylib Same
  • 17. LIBRARIES FLAVOROUS We should distinguish next libraries: • System dynamic libraries (very optimized, stored in shared library caches) • Third-party dynamic libraries • Static libraries
  • 18. STATIC LIBRARY • Resolved in compile time • Loads fast with main binary • Can not contain resources (it’s just code) AppA A B ZZZ
  • 19. DYNAMIC LIBRARIES (FRAMEWORKS) • Resolved in runtime • Can be shared between processes • System frameworks • App extensions • Can be lazy loaded in runtime • Can support versioning (frameworks) • Can contain resources (frameworks) AppA A.dylib B.dylib ZZZ.framework ZZZ.dylib resources
  • 20. LIBRARIES FLAVOROUS: CONCLUSION • System dynamic libraries — fast, super easy to use • Third-party dynamic libraries — slow, easy to use • Static libraries — fastest, but you should pay attention
  • 21. APP LOADING (AGAIN) • exec() • Load application into memory • Load dylibs • Rebase & bind • Obj-C runtime setup • Initializers • main()
  • 22. APP LOADING IMPROVEMENTS • Reduce dynamic libraries count • Reduce Obj-C usage (if Obj-C runtime phase is a problem) • Avoid initializations on start: • use + initialize instead of +load • refactor static C++ objects • FYI: Swift’s `static let` is lazy (Cool!)
  • 23. REDUCE DYNAMIC LIBRARIES COUNT • Cleanup codebase and remove duplicated libraries • Avoid “one file” libraries (plenty of them in cocoapods) • Use lazy loading with dlopen() • Put library as sources • Switch to static libraries…
  • 24. STATIC LIBRARIES • Static libraries are not allowed in Swift!!! • Static libraries are allowed in Swift starting from Xcode 9.0 (stable work from Xcode 9.4)
  • 25. DEPENDENCY MANAGERS • Cocoapods • Carthage • Swift Package Manager • Submodules and your own hands 🤲 • All of them have (basic) static libraries support
  • 26. STATIC LIBRARIES: CONCLUSION • We able to reduce app start time in several times • Requires dependency manager support (and framework podspec update) • Minor code changes (relative to other approaches) • If framework contains resources you should move them to bundle by yourself
  • 27. XCODE • In Objective-C/C++/C-style: • Hide all private content in .m/.cpp/.c file • Expose in .h only what is absolutely necessary • Write #import only when you need it • Write @class (forward declaration) in headers if possible • etc. • Swift-style: • Don’t care, I will do it all by myself!!!11one
  • 28. SWIFT COMPILATION MODES • Whole-module -wmo, -whole-module-optimization, -force-single-frontend-invocation A.Swift App B.swift Frontend Job C.swift A.Swift B.swift Frontend Job C.swift Frontend Job Frontend Job • Primary-file Linker App Linker Read and compile target file Read for metainformation Swift’s Github, Compiler Performance
  • 29. XCODE MODULES • Apple recommends to use Modules • Now it’s possible to use Modules as static or dynamic libraries • Good Modules breakdown can: • Improve code decoupling • Give some hints to compiler • Give great performance boost for primary-file mode
  • 30. ACTION POINTS • Check you app start time • Automate this process (CI) and collect statistic • Determine bottlenecks and fix them • Check your project’s dependencies, remove what possible • You can move some libraries to static one • Breakdown your project to modules
  • 31. FURTHER READING • WWDC 2016: Optimizing App Startup Time (session 406) • WWDC 2012: iOS App Performance: Responsiveness (session 235) • Jonathan Levin, Mac OSX® And iOS Internals, John Wiley & Sons, Inc, 2013 (this one is sooooo goooood! And it’s available for free) • Apple’s Dynamic Library Programming Topics • Apple’s Memory Usage Performance Guidelines (About the Virtual Memory System) • Xcode 9 Release Notes • Swift’s Github, Compiler Performance • https://github.com/libimobiledevice/libimobiledevice