Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Optimizing & Profiling UI Performance
Search
Brenda Cook
July 29, 2016
Programming
6
13k
Optimizing & Profiling UI Performance
Presented at 360|AnDev 2016
Brenda Cook
July 29, 2016
Tweet
Share
More Decks by Brenda Cook
See All by Brenda Cook
Fragments: Why? How? and What For?
kenodoggy
3
3.6k
Other Decks in Programming
See All in Programming
tparseでgo testの出力を見やすくする
utgwkk
2
220
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
130
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
150
20 years of Symfony, what's next?
fabpot
2
360
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
110
Microservices rules: What good looks like
cer
PRO
0
1.4k
愛される翻訳の秘訣
kishikawakatsumi
3
320
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
dotfiles 式年遷宮 令和最新版
masawada
1
770
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
320
関数実行の裏側では何が起きているのか?
minop1205
1
690
認証・認可の基本を学ぼう後編
kouyuume
0
190
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
KATA
mclloyd
PRO
32
15k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
It's Worth the Effort
3n
187
29k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Making Projects Easy
brettharned
120
6.5k
Six Lessons from altMBA
skipperchong
29
4.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
A designer walks into a library…
pauljervisheath
210
24k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Rails Girls Zürich Keynote
gr2m
95
14k
Transcript
Optimizing & Profiling UI Performance
What does it mean to have performant UI?
Jank
Frame Rate (FPS)
Refresh Rate (Hz)
1 second (1000ms) / 60 frames = 16.67ms per frame
FPS is capped by device display (refresh rate Hz) due to VSync
VSync
3 Double Buffering 0 1 2 1 2 CPU GPU
Display 1 1 Front Buffer CPU GPU Back Buffer 2 3 3 VSync VSync VSync VSync Frame Drop
4 3 Triple Buffering 0 1 2 3 1 2
CPU GPU Display 1 1 Front Buffer CPU GPU Back Buffer CPU GPU 3rd Buffer 2 3 4 VSync VSync VSync VSync Frame Drop
No VSync
Optimize
Flatten View Hierarchy
Deeply Nested View Hierarchy
Deeply Nested View Hierarchy
Shallow View Hierarchy
Deeply Nested Design View Optimized
Hierarchy Viewer
3 2 1
[show deeply nested hierarchy]
[show shallow hierarchy]
[show image of obtaining measure, layout and draw time]
None
None
Know your Views
GPU Overdraw
None
None
None
clipRect & quickReject
Performance Profiling
Profile GPU Rendering
None
Marshmallow
None
Android Studio Monitors
None
android { buildTypes { debug { debuggable true }
release { ... } } }
None
None
Systrace
$ cd android-sdk/platform-tools/systrace $ python systrace.py --time=10 -o mytrace.html sched
gfx view wm
None
None
None
None
None
None
None
None
Image Libraries to the Rescue! Picasso
Thank you Twitter @kenodoggy g+ +BrendaCook_kenodoggy