2. @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
4. @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
9. @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
19. @littleeyelabs
varying download pattern
monitor charge level and state
monitor and determine
docking state
monitor connectivity state
programmatic control over
receivers
tips to optimize
network power
20. @littleeyelabs
varying download pattern
monitor charge level and state
monitor and determine
docking state
monitor connectivity state
programmatic control over
receivers
tips to optimize
network power
21. @littleeyelabs
varying download pattern
monitor charge level and state
monitor and determine
docking state
monitor connectivity state
programmatic control over
receivers
tips to optimize
network power
22. @littleeyelabs
varying download pattern
monitor charge level and state
monitor and determine
docking state
monitor connectivity state
programmatic control over
receivers
tips to optimize
network power
23. @littleeyelabs
varying download pattern
monitor charge level and state
monitor and determine
docking state
monitor connectivity state
programmatic control over
receivers
tips to optimize
network power
24. @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
27. @littleeyelabs
tips to optimize
cpu usage
wakelocks
great power comes with great responsibility
be conscious about how often/long they are
used
use ‘android:keepScreenOn’
spread out your computationally
intensive job
28. @littleeyelabs
tips to optimize
cpu usage
wakelocks
great power comes with great responsibility
be conscious about how often/long they are
used
use ‘android:keepScreenOn’
spread out your computationally
intensive job
29. @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
30. @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
31. @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
32. @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
33. @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
37. @littleeyelabs
running out of
memory
leaks
references 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
39. @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
41. @littleeyelabs
“Things well done and with a care,
exempt themselves from fear”
William Shakespeare
@littleeyelabs
https://angel.co/little-eye-labs
also on