Advanced Android: Performance Analysis and Tuning
Getting your Android app to work is tough enough. Getting it
to work in a performant fashion requires additional effort. And, unlike
crashes that get your attention, poor app performance is "the silent
killer" that can drag down your users' devices and their satisfaction
with your app. In this one-day seminar, we will review five key Android
app usage metrics (RAM, CPU, power, local storage, and bandwidth) and
discuss how to measure and optimize your app's use of each.
During this one-day advanced Android app development seminar, we
will explore the following:
Memory Measurement and Optimization (~2 hours)
- How much system RAM are we using, and how does that tie into our
Android app's heap limit?
- Why do we get OutOfMemoryErrors so much on Android, compared to other
- How do we determine how much system RAM we are using?
- What are common sources of memory leaks, and how do we find them?
- If we're in a bind on heap space, how do we "cheat" and get more
Power Measurement and Optimization (~1 hour)
- How does the user know how much power we are using?
- How do we, as developers, find out about power events within the
- How can we reduce the impact of our background work to consume less
- How can we find out when the battery is getting low, and how can we
affect our app's behavior when it is low?
- How is Android changing to try to improve battery life, and how
will those changes affect our existing apps?
CPU Measurement and Optimization (~2 hours)
- How do we know how much CPU we are using over time?
- How do we arrange to do work when the user is not using the device,
and therefore will not be affected by our CPU usage?
- How can we find the "hot spots" in our app?
- What is "jank" with respect to our UI, and how do we find out how we
are causing it?
- How do we reduce the complexity of layouts, to perhaps help with jank?
- How can we use other computing options, such as the NDK or RenderScript
Compute, to reduce the CPU load of our algorithms?
Storage Measurement and Optimization (~1 hour)
- Where can we store data, and what are the limits of such storage?
- How do we determine at runtime how much storage space we are using?
- Our app is getting huge — how do we reduce the size of the APK
Bandwidth Measurement and Optimization (~1 hour)
- How do we measure bandwidth consumption during development?
- How can we meter our bandwidth consumption at runtime?
- What techniques from Web development can we leverage in reducing our
- What are the tradeoffs between reducing bandwidth and reducing other
metrics (e.g., storage, power)?