Google I/O 2009 - Debugging Arts of the Ninja Masters

Google for Developers · 42K views · 2009 · 58:16

Open on YouTube

Testing, debugging & developer toolsSoftware performance & optimizationtalkdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering Android questions about profiling slow code, tracking down memory leaks, and using DDMS and Traceview.

Recommended by 3 people across 3 different months, 2013 to 2014.

What it is

A 2009 Google I/O session by Justin Mattson on advanced Android debugging tools, including traceview, the hierarchy viewer and the instrumentation system. It includes case studies where Google used these tools to fix real performance problems, with before-and-after results.

What people said

Recommends rich200313 · 2013-01 · Stack Overflow · on “Any way to selectively enable/disable debugging on android”

The easiest way to do this would most likely be through the DDMS perspective in eclipse. Run your app on the device as you usually would (the method that currently takes around 50 seconds to start). Once the app has started switch to the DDMS perspective (usually in the top right of eclipse, you may have to add/open the perspective if you have not used it before just by clicking the add button and finding DDMs in the pop up window). Once you are in the DDMS perspective your device and any processes running on it should show in the devices tab in this perspective (on the left by default). Once the initial load has completed you can select you app process from the list and enable the debugger

Recommends Ben Pearson · 2014-02 · Stack Overflow · on “How much memory your app will take up when develop the android app?”

The amount of memory used by bitmaps is based on what's in the bitmap, not the size of the file. There's a few things you can do to reduce the footprint of the bitmap being loaded [LINK] in to memory, which, in turn will reduce the amount of memory your app is using. There's a great talk here from Google I/O for memory management [LINK] that will help and another that will help you check to see if you have any memory leaks [this video] as well. Also, note that if you use Bitmap.Config.RGB_565 [LINK] you can half the amount of memory that the Bitmap is using (each pixel value is stored in 2 bytes instead of 4)

Recommends CommonsWare · 2014-03 · Stack Overflow · on “HttpURLConnection very slow compared to equivalent iOS implementation”

"So, what in DDMS helps me to find and resolve this problem?" -- Traceview helps you find and resolve this problem. [LINK] [LINK] [LINK] [this video]