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
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
580
SwiftUI Viewの責務分離
elmetal
PRO
1
230
Writing documentation can be fun with plugin system
okuramasafumi
0
120
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.3k
Open source software: how to live long and go far
gaelvaroquaux
0
630
Unity Android XR入門
sakutama_11
0
160
楽しく向き合う例外対応
okutsu
0
110
もう僕は OpenAPI を書きたくない
sgash708
5
1.6k
color-scheme: light dark; を完全に理解する
uhyo
3
300
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
2
400
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
120
Ruby on cygwin 2025-02
fd0
0
140
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
74
9.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Practical Orchestrator
shlominoach
186
10k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
630
Become a Pro
speakerdeck
PRO
26
5.1k
Designing for humans not robots
tammielis
250
25k
KATA
mclloyd
29
14k
Rails Girls Zürich Keynote
gr2m
94
13k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
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