SlideShare a Scribd company logo
1 of 21
Download to read offline
Android Performance Tools
Heghine Hakobyan
#GoNative
performance
noun
1. an act of presenting a play
2. the action or process of performing a task or function
#GoNative
Why?
#GoNative
#GoNative
Unhappy Users
Bad Reviews
Unhappy Developers
Bad Applications
#GoNative
Compute Memory
60 Frames Per Second
≅16ms
#GoNative
#GoNative
S C R E E N
GPURASTERIZATION
CPU
Polygons Textures
UI ELEMENTS
UI Thread
Render
Thread
#GoNative
UPDATE UPDATE UPDATE UPDATE
16ms 16ms 16ms 16ms
DRAW! DRAW! DRAW! DRAW!
#GoNative
UPDATE 24ms UPDATE UPDATE
16ms 32ms 16ms
DRAW! DRAW! DRAW!
Ooops!
dropped frame
#GoNative
GPU Rendering
16ms
Swap Buffers
Command Issue
Sync & Upload
Draw
Measure/Layout
Animation
Input Handling
Vsync Delay
#GoNative
GPU Overdraw
1 time
2 times
3 times
≥ 4 times
4x
#GoNative
Systrace
#GoNative
./systrace.py sched idle wm gfx view dalvik input -t 5 -o trace.html -b 96000
./systrace.py [categories] [options]
#GoNative
Best Practices
● Simplify view hierarchy - use ConstraintLayout
● Do NOT set background color on ImageView
● Be careful with custom views
#GoNative
Android Profiler
#GoNative
Memory Monitor
#GoNative
Heap Viewer
#GoNative
Best Practices
● Avoid non-static inner classes - AsyncTasks/Threads
● Do NOT store references to Activity/View in AsyncTasks
● Never store static references to Context/View
#GoNative
Questions?
#GoNative
Links
● https://developer.android.com/studio/profile/inspect-gpu-rendering.html
● https://developer.android.com/studio/command-line/systrace.html
● https://developer.android.com/studio/profile/index.html
● Android Performance Patterns on YouTube!

More Related Content

Similar to Android Performance Tools

Advanced #4 GPU & Animations
Advanced #4   GPU & AnimationsAdvanced #4   GPU & Animations
Advanced #4 GPU & AnimationsVitali Pekelis
 
Hacking to be performant
Hacking to be performantHacking to be performant
Hacking to be performantApoorv Saxena
 
Running HTML5 Mobile Web Games at 60fps
Running HTML5 Mobile Web Games at 60fpsRunning HTML5 Mobile Web Games at 60fps
Running HTML5 Mobile Web Games at 60fpsApoorv Saxena
 
Snappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember AppsSnappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember AppsMatthew Beale
 
Android game development
Android game developmentAndroid game development
Android game developmentmilandinic
 
Html5 game using impact js
Html5 game using impact jsHtml5 game using impact js
Html5 game using impact jsHa Bogay
 
Conquering Gef Part2: Building graphical web-apps with Eclipse
Conquering Gef Part2: Building graphical web-apps with EclipseConquering Gef Part2: Building graphical web-apps with Eclipse
Conquering Gef Part2: Building graphical web-apps with EclipseVineet Sinha
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet
 
Build your own low latency live platform
Build your own low latency live platformBuild your own low latency live platform
Build your own low latency live platformJordi Cenzano
 
Mono for Game Developers - AltDevConf 2012
Mono for Game Developers - AltDevConf 2012Mono for Game Developers - AltDevConf 2012
Mono for Game Developers - AltDevConf 2012Xamarin
 
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...DevClub_lv
 
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJSFestUA
 
"Gridd: Retroenhanced" - what is behind the scenes? - Andrea Tabacco, Lara Gi...
"Gridd: Retroenhanced" - what is behind the scenes? - Andrea Tabacco, Lara Gi..."Gridd: Retroenhanced" - what is behind the scenes? - Andrea Tabacco, Lara Gi...
"Gridd: Retroenhanced" - what is behind the scenes? - Andrea Tabacco, Lara Gi...Codemotion
 
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?Sacha Leprêtre
 
TDC2019 Intel Software Day - Otimizacao grafica com o Intel GPA
TDC2019 Intel Software Day - Otimizacao grafica com o Intel GPATDC2019 Intel Software Day - Otimizacao grafica com o Intel GPA
TDC2019 Intel Software Day - Otimizacao grafica com o Intel GPAtdc-globalcode
 
Android app to the challenge
Android   app to the challengeAndroid   app to the challenge
Android app to the challengeUdi Cohen
 
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016Codemotion
 

Similar to Android Performance Tools (20)

Advanced #4 GPU & Animations
Advanced #4   GPU & AnimationsAdvanced #4   GPU & Animations
Advanced #4 GPU & Animations
 
Hacking to be performant
Hacking to be performantHacking to be performant
Hacking to be performant
 
Pc54
Pc54Pc54
Pc54
 
Running HTML5 Mobile Web Games at 60fps
Running HTML5 Mobile Web Games at 60fpsRunning HTML5 Mobile Web Games at 60fps
Running HTML5 Mobile Web Games at 60fps
 
Snappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember AppsSnappy Means Happy: Performance in Ember Apps
Snappy Means Happy: Performance in Ember Apps
 
Android game development
Android game developmentAndroid game development
Android game development
 
Html5 game using impact js
Html5 game using impact jsHtml5 game using impact js
Html5 game using impact js
 
Conquering Gef Part2: Building graphical web-apps with Eclipse
Conquering Gef Part2: Building graphical web-apps with EclipseConquering Gef Part2: Building graphical web-apps with Eclipse
Conquering Gef Part2: Building graphical web-apps with Eclipse
 
Hacking for salone: drone races
Hacking for salone: drone racesHacking for salone: drone races
Hacking for salone: drone races
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
 
Build your own low latency live platform
Build your own low latency live platformBuild your own low latency live platform
Build your own low latency live platform
 
Mono for Game Developers - AltDevConf 2012
Mono for Game Developers - AltDevConf 2012Mono for Game Developers - AltDevConf 2012
Mono for Game Developers - AltDevConf 2012
 
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
AAA 3D GRAPHICS ON THE WEB WITH REACTJS + BABYLONJS + UNITY3D by Denis Radin ...
 
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3DJS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
JS Fest 2019. Денис Радин. AAA 3D графика в Web с ReactJS, BabylonJS и Unity3D
 
"Gridd: Retroenhanced" - what is behind the scenes? - Andrea Tabacco, Lara Gi...
"Gridd: Retroenhanced" - what is behind the scenes? - Andrea Tabacco, Lara Gi..."Gridd: Retroenhanced" - what is behind the scenes? - Andrea Tabacco, Lara Gi...
"Gridd: Retroenhanced" - what is behind the scenes? - Andrea Tabacco, Lara Gi...
 
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
Chrome Dev Summit Summary 2013 part 1 - what’s hot ?
 
TDC2019 Intel Software Day - Otimizacao grafica com o Intel GPA
TDC2019 Intel Software Day - Otimizacao grafica com o Intel GPATDC2019 Intel Software Day - Otimizacao grafica com o Intel GPA
TDC2019 Intel Software Day - Otimizacao grafica com o Intel GPA
 
Android app to the challenge
Android   app to the challengeAndroid   app to the challenge
Android app to the challenge
 
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
Hacking for Salone: Drone Races - Di Saverio; Lippolis - Codemotion Milan 2016
 
Flowframes
FlowframesFlowframes
Flowframes
 

Android Performance Tools