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
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.4k
Other Decks in Programming
See All in Programming
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
180
たのしいparse.y
ydah
3
120
Haze - Real time background blurring
chrisbanes
1
510
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
280
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
3
380
103 Early Hints
sugi_0000
1
230
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
720
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
100
From Translations to Multi Dimension Entities
alexanderschranz
2
130
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Code Reviewing Like a Champion
maltzj
520
39k
Faster Mobile Websites
deanohume
305
30k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
A better future with KSS
kneath
238
17k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
How to train your dragon (web standard)
notwaldorf
88
5.7k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
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