Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
App Startup Time: Optimization & Monitoring
Search
d_date
June 18, 2017
Programming
3
3.2k
App Startup Time: Optimization & Monitoring
2017/06/19 potatotips #41
2017/07/15 SWWDC x AKIBA.swift
d_date
June 18, 2017
Tweet
Share
More Decks by d_date
See All by d_date
TCA Practice in 5 min
d_date
2
1.5k
waiwai-swiftpm-part2
d_date
3
510
わいわいSwift PM part 1
d_date
2
410
What's new in Firebase 2021
d_date
2
1.5k
CI/CDをミニマルに構築する
d_date
1
570
Swift Package centered project - Build and Practice
d_date
20
14k
How to write Great Proposal
d_date
4
1.5k
Thinking about Architecture for SwiftUI
d_date
8
2.4k
Integrate your app to modern world in Niigata
d_date
0
670
Other Decks in Programming
See All in Programming
Blueskyのプラグインを作ってみた
hakkadaikon
1
540
技術懸念に立ち向かい 法改正を穏便に乗り切った話
pop_cashew
0
1.4k
実践ArchUnit ~実例による検証パターンの紹介~
ogiwarat
2
260
つよそうにふるまい、つよい成果を出すのなら、つよいのかもしれない
irof
1
280
ReadMoreTextView
fornewid
1
390
Datadog RUM 本番導入までの道
shinter61
1
270
イベントストーミングから始めるドメイン駆動設計
jgeem
4
830
Webからモバイルへ Vue.js × Capacitor 活用事例
naokihaba
0
600
GoのWebAssembly活用パターン紹介
syumai
3
10k
社内での開発コミュニティ活動とモジュラーモノリス標準化事例のご紹介/xPalette and Introduction of Modular monolith standardization
m4maruyama
1
120
XSLTで作るBrainfuck処理系
makki_d
0
200
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
360
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
Designing for Performance
lara
609
69k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
The Cult of Friendly URLs
andyhume
79
6.4k
Docker and Python
trallard
44
3.4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Building a Modern Day E-commerce SEO Strategy
aleyda
41
7.3k
Become a Pro
speakerdeck
PRO
28
5.4k
A designer walks into a library…
pauljervisheath
206
24k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Transcript
App Startup Time: Optimization & Monitoring Daiki Matsudate,@d_date, iOS Freelancer
Developer SWWDC x AKIBA.swift in Sendai
Daiki Matsudate,@d_date • iOS Freelancer • Supporting Realm as News
Translator • Organizer of CLEM • WWDC17 Attendee
SWWDC
WWDC
WWDC17
WWDC17 • Back to San Jose • Over 3,000 attendee
• Over 200 sessions / labs / events
Sessions • Frameworks • Design • Developer Tools • Distribution
• Featured • Graphics and Games • Media • System Frameworks
Developer Tools Localizing Swift Debugging Xcode9 Github Undefined Behavior Playgrounds
Testing LLVM Interface Builder App Startup Time Testability
Developer Tools Localizing Swift Debugging Xcode9 Github Undefined Behavior Playgrounds
Testing LLVM Interface Builder App Startup Time Testability
Recognition • ը૾ͷࢹೝ … 13ms • ϑΥʔΧεઌͷܾఆ…100 - 140ms •
ૢ࡞͕ྲྀΕʹ͍ͬͯΔ…200 - 1000ms • ڵຯͷର͕ଞʹҠΔ… 1000 - 10000ms • ؔ৺͕ࣦΘΕΔ … 10000ms - 2014 MIT Research
Recognition • ը૾ͷࢹೝ … 13ms • ϑΥʔΧεઌͷܾఆ…100 - 140ms •
ૢ࡞͕ྲྀΕʹ͍ͬͯΔ…200 - 1000ms • ڵຯͷର͕ଞʹҠΔ… 1000 - 10000ms • ؔ৺͕ࣦΘΕΔ … 10000ms - 2014 MIT
App Startup Time • Do less! • Embed fewer dylibs
• Declare classes/methods • Use fewer initializers • Use more Swift • No initializers • Swift size improvements
Monitoring • In Development • Use DYLD_PRINT_STATISTICS • Initializer Calls
• After Release • Firebase Performance Monitoring How to
Initializer Calls • Available on iOS 11 and macOS High
Sierra • Provides precise timing for each static initializer • Available through Instruments
Initializer Calls Demo
Firebase
• Google I/O 2017 Ͱൃද • iOS / Android ྆ରԠ
Firebase Performance
• ΞϓϦىಈ࣌ؒ, HTTP/S network requestͳͲΛ ࣗಈͰܭଌ • ΞϓϦͷύϑΥʔϚϯεͷվળՕॴ͕Θ͔Δ • ΞϓϦʹ߹ΘͤͯܭଌΛΧελϚΠζͰ͖Δ
Firebase Performance
Firebase Performance Install pod ‘Firebase/Monitoring’ Podfile
Firebase Performance Demo
Summary • fewer dylibs, classes/methods, initializer • Use more Swift
• App startup time monitoring • Use DYLD_PRINT_STATISTICS • Initializer Calls - Instruments (iOS 11~) • Firebase Performance Monitoring
Resources App Startup Time:Past, Present, and Future WWDC 2017 Optimizing
App Startup Time WWDC 2016 Firebase Performance Monitoring
SWWDC x AKIBA.swift in Sendai