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.
19 files changed