App performance littleeyelabs
-
Upload
littleeye -
Category
Technology
-
view
1.491 -
download
0
Transcript of App performance littleeyelabs
@littleeyelabs
mobile app insights like never before
Understanding the why and what of Android app performance
@littleeyelabs
if customers uninstall, they are lost forever!
customers hate apps that drain power, crash or perform badly
“44% of users uninstall apps that perform badly”
“96% of users will give such apps a bad rating”
Source: http://apigee.com/about/pressrelease/apigee-survey-users-reveal-top-frustrations-lead-bad-mobile-app-reviews
@littleeyelabs
happens to the best of apps!
@littleeyelabs
phenomenon is not limited to consumer apps!
“if I had a penny for everytime someone complained about my app draining battery, I would be a millionaire”
- Slightly exaggerated quote of a frustrated QA manager in a large MDM company
Source: http://apigee.com/about/pressrelease/apigee-survey-users-reveal-top-frustrations-lead-bad-mobile-app-reviews
@littleeyelabs
top performance parameters
battery drain
network consumption
crashes
responsiveness
@littleeyelabs
understanding battery consumption!
@littleeyelabs
what consumespower
@littleeyelabs
networkcpudisplaygpsgpu
optimization opportunities
@littleeyelabs
EDGE slow, less power per byte of data transfer
Wifi more power, but faster
3G more power than Wifi, typically slower than Wifi.
4G more power than 3G, potentially faster than Wifi
4G > 3G > Wifi > 2G
network basics
@littleeyelabs
what causes power
consumption?
four primary states -establishmaintain (idle)transmit (two or more sub states)tail state (pseudo state)
what causes power
consumption?
@littleeyelabs
Establish Maintain Transmit Tail
Wifi High Low Low Low
2G Low Low Low Low
3G Low Low High High
what causes power
consumption?
@littleeyelabs
understanding state transitions
@littleeyelabs
prefetch databatch datadetect network stateavoid pollinguse inexact timersuse caching
tips to optimize network power
@littleeyelabs
prefetch databatch datadetect network stateavoid pollinguse inexact timersuse caching
tips to optimize network power
@littleeyelabs
prefetch databatch datadetect network stateavoid pollinguse inexact timersuse caching
tips to optimize network power
@littleeyelabs
prefetch databatch datadetect network stateavoid pollinguse inexact timersuse caching
tips to optimize network power
@littleeyelabs
prefetch databatch datadetect network stateavoid pollinguse inexact timersuse caching
tips to optimize network power
@littleeyelabs
prefetch databatch datadetect network stateavoid pollinguse inexact timersuse caching
tips to optimize network power
@littleeyelabs
varying download patternmonitor charge level and statemonitor and determine docking statemonitor connectivity stateprogrammatic control over receivers
tips to optimize network power
@littleeyelabs
varying download patternmonitor charge level and statemonitor and determine docking statemonitor connectivity stateprogrammatic control over receivers
tips to optimize network power
@littleeyelabs
varying download patternmonitor charge level and statemonitor and determine docking statemonitor connectivity stateprogrammatic control over receivers
tips to optimize network power
@littleeyelabs
varying download patternmonitor charge level and statemonitor and determine docking statemonitor connectivity stateprogrammatic control over receivers
tips to optimize network power
@littleeyelabs
varying download patternmonitor charge level and statemonitor and determine docking statemonitor connectivity stateprogrammatic control over receivers
tips to optimize network power
@littleeyelabs
CPU basics
runs on various frequencies
frequency controlled by governor policy
transitions controlled at linux layer
drops down to ‘deep sleep’ as much as it can
frequencies are scaled based of usage
@littleeyelabs
CPU spy
@littleeyelabs
monitor CPU usage
@littleeyelabs
tips to optimize cpu usage
wakelocksgreat power comes with great responsibility
be conscious about how often/long they are used
use ‘android:keepScreenOn’
spread out your computationally intensive job
@littleeyelabs
tips to optimize cpu usage
wakelocksgreat power comes with great responsibility
be conscious about how often/long they are used
use ‘android:keepScreenOn’
spread out your computationally intensive job
@littleeyelabs
tips to optimize cpu usage
gpu consumes more power than cpu
avoid floating point math where possible
use gpu for data-parallel tasks like video/image processing
use algorithms that consume less CPU cycle
O(n log n) vs O(n 2) algorithms
goal - keep the freq to the lowest level and/or reduce the number of cycles
@littleeyelabs
tips to optimize cpu usage
gpu consumes more power than cpu
avoid floating point math where possible
use gpu for data-parallel tasks like video/image processing
use algorithms that consume less CPU cycle
O(n log n) vs O(n 2) algorithms
goal - keep the freq to the lowest level and/or reduce the number of cycles
@littleeyelabs
tips to optimize cpu usage
gpu consumes more power than cpu
avoid floating point math where possible
use gpu for data-parallel tasks like video/image processing
use algorithms that consume less CPU cycle
O(n log n) vs O(n 2) algorithms
goal - keep the freq to the lowest level and/or reduce the number of cycles
@littleeyelabs
tips to optimize cpu usage
gpu consumes more power than cpu
avoid floating point math where possible
use gpu for data-parallel tasks like video/image processing
use algorithms that consume less CPU cycle
O(n log n) vs O(n 2) algorithms
goal - keep the freq to the lowest level and/or reduce the number of cycles
@littleeyelabs
screen tips color matters!esp on OLED screens
darker the color, lesser the consumption
brightness levels have more impact
programmatically reduce brightness if its suits your app/activity
@littleeyelabs
impact of display
@littleeyelabs
crashes!
@littleeyelabs
top reasons
running out of memory
hitting unexpected conditions in the app
network changes
demand exceeding expectation
responsiveness
@littleeyelabs
running out ofmemory
leaksreferences continue to exist
GC cannot collect objects, even when not used
quickly identify which use case does not reduce memory consumption
use heap dumps to drill down to actual object
continuous heap dumps and diff
@littleeyelabs
analyzing memory consumption trends
@littleeyelabs
pre & post-production analysis and monitoring
detecting performance impacts before and after release is vital
post-production tracks issues as it happens with customers
crashlytics
crittercism
pre-production analysis helps prevent issues before customers face it
Little Eye
DDMS
@littleeyelabs
demo of little eye
@littleeyelabs
“Things well done and with a care, exempt themselves from fear”
William Shakespeare
@littleeyelabs
https://angel.co/little-eye-labs
also on