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.3k
Other Decks in Programming
See All in Programming
「2024年版 Kotlin サーバーサイドプログラミング実践開発」の補講 〜O/Rマッパー編〜
n_takehata
2
260
なぜ宣言的 UI は壊れにくいのか / Why declarative UI is less fragile
uenitty
29
13k
英語
s_shimotori
1
220
データカタログ運用物語 〜令和6年夏の理想と現実〜
kuro_kurorrr
0
110
Advanced App Shrinking Techniques
cbeyls
2
150
最近追加した型の紹介とその振り返り
aki19035vc
0
180
CSC307 Lecture 07
javiergs
PRO
0
220
CSC307 Lecture 06
javiergs
PRO
0
360
Async Await: Mastering Python's Time-Bending Tricks - EuroPython2024
yanbo
1
290
Namespace on read
tagomoris
2
370
MIERUNE BBQにおけるユーザー中心設計()
mierune
PRO
1
110
Rustのweb開発を助ける 便利なツール紹介
yuki0418
1
190
Featured
See All Featured
Statistics for Hackers
jakevdp
792
220k
The Power of CSS Pseudo Elements
geoffreycrofte
64
5.2k
Infographics Made Easy
chrislema
238
18k
Ruby is Unlike a Banana
tanoku
96
10k
How to Think Like a Performance Engineer
csswizardry
4
590
The Brand Is Dead. Long Live the Brand.
mthomps
52
36k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
24
1.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
325
21k
Design by the Numbers
sachag
277
18k
Build The Right Thing And Hit Your Dates
maggiecrowley
28
2.2k
Side Projects
sachag
451
42k
Typedesign – Prime Four
hannesfritz
37
2.2k
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