O'Reilly logo

Pro Android Apps Performance Optimization by Hervé Guihot

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tracing

Once you identify what is taking too much time, you probably want to be able to know in more detail which methods are the culprits. You can do this by creating trace files with the help of a tracing-specific method, and then analyze them with the Traceview tool.

Debug.startMethodTracing()

Android provides the Debug.startMethodTracing() method to create trace files that can then be used with the Traceview tool to debug and profile your application. There are actually four variants of the Debug.startMethodTracing() method:

  • startMethodTracing()
  • startMethodTracing(String traceName)
  • startMethodTracing(String traceName, int bufferSize)
  • startMethodTracing(String traceName, int bufferSize, int flags)

The traceName parameter specifies the name ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required