diff options
author | Siva Velusamy <vsiva@google.com> | 2015-04-22 10:23:56 -0700 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2015-05-07 18:44:15 -0700 |
commit | 0d857b9028f2702ce439e13feccde8182d40e1e5 (patch) | |
tree | a20bf172e726bef479b16ab121ee5a348df6b613 /tests/HierarchyViewerTest/build.gradle | |
parent | 0a008049a21c5fbe36eac8047c5411c2e3aff41b (diff) | |
download | frameworks_base-0d857b9028f2702ce439e13feccde8182d40e1e5.zip frameworks_base-0d857b9028f2702ce439e13feccde8182d40e1e5.tar.gz frameworks_base-0d857b9028f2702ce439e13feccde8182d40e1e5.tar.bz2 |
Improve hierarchy viewer dump hierarchy latency
Hierarchy Viewer obtains the properties for each view by using
reflection and looking for fields and methods that have the
@ExportedProperty annotation. Using reflection made it quite slow
for large view hierarchies.
This CL adds a new method (encode) to each class that wishes to
export data to hiererachy viewer. Inside this method, the object
can write a sequence of key, value pairs corresponding to the
values it wants exported.
With this change, the dump hierarchy operation that used to take
more than 10 seconds can be performed in a few hundred milliseconds.
Change-Id: I199ac2e7ca3c59ebcfec7e6bd201e134c41fd583
Diffstat (limited to 'tests/HierarchyViewerTest/build.gradle')
-rw-r--r-- | tests/HierarchyViewerTest/build.gradle | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/HierarchyViewerTest/build.gradle b/tests/HierarchyViewerTest/build.gradle new file mode 100644 index 0000000..e8cdfa2 --- /dev/null +++ b/tests/HierarchyViewerTest/build.gradle @@ -0,0 +1,31 @@ +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.1.0+' + + } +} + +apply plugin: 'com.android.application' + +android { + compileSdkVersion 21 + buildToolsVersion "22.0.0" + + defaultConfig { + minSdkVersion 21 + targetSdkVersion 21 + versionCode 1 + versionName "1.0" + } + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + res.srcDirs = ['res'] + } + } +} |