Google Nov 3, 2022

Measuring Android App Performance with Profileable Builds

Article Summary

Yi Yang from Google reveals why your Android performance measurements might be completely wrong. Debug builds can show 2-3x worse performance than what users actually experience.

Google's Android team explains profileable builds, a feature that enables accurate performance measurement without the overhead of debug mode. The article demonstrates how traditional debug profiling misleads developers and provides step-by-step guidance for implementing profileable builds in Android 10+.

Key Takeaways

Critical Insight

Profileable builds let Android developers measure real-world performance accurately without the 2-3x slowdown that debug mode introduces.

The article includes side-by-side screen recordings showing exactly how much debug mode distorts your frame timing measurements.

About This Article

Problem

Android developers couldn't measure performance accurately because profiling required debug builds. Debug builds disable compiler optimizations, so timing measurements don't match what happens in production release builds.

Solution

Google added the profileable manifest tag in Android 10. This lets developers profile CPU and native memory on release builds with very little performance cost. Access is limited to timing-critical features like Callstack Sampling and System Trace.

Impact

Release builds with profileable enabled run at nearly the same speed as unmodified release builds. Developers can now measure real app performance without the misleading numbers that debug builds give them.

Recent from Google

Related Articles