Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Hierarchy viewer is not showing timings for rendering

I'm having some performance problems with my application and I've found this article for helping me.

The problem is that when I execute Hierarchy viewer, I always have n/a as Measure, Layout and Draw time for each component of the view.

I'm using Android 3.2 in my virtual device.

Thanks.

EDIT

I add a capture of the Hierarchy Viewer output: Hierarchy Viewer example

When I use the Hierarchy viewer with the initial activity (a very simple activity), it works perfectly. But when i used this activity, I can't see the times for drawing each component.

like image 959
gutiory Avatar asked Aug 06 '12 09:08

gutiory


3 Answers

To see the three measures select your root view and click this button show measures button. Its description is "Obtain layout times for tree rooted at selected node". The button has to be placed on the top of the Hierarchy viewer.

like image 76
Mario Kutlev Avatar answered Oct 22 '22 05:10

Mario Kutlev


Android hierarchy viewer is working on Android 2.3 and onwards. It does not matter what your device os version is. Your target api version should be 2.3 or higher. In that case you can change the min version in project properties.

If you want to optimize your layout you need to do several things. This article explain how to optimize and the areas you should concern more.

like image 5
Ruwantha Avatar answered Oct 22 '22 07:10

Ruwantha


Click where the arrows are in this pic

That is, the root node, and then the "profile node" button in the top right.

Then click individual nodes and it shows timings rather than n/a

enter image description here

like image 4
barlop Avatar answered Oct 22 '22 06:10

barlop