Skip to content
Commit 401900c9 authored by Joanne Chung's avatar Joanne Chung
Browse files

Optimization: find views in single traversal.

The app will pass a list of views for Textview translation. Currently,
we traverse the view tree for each requested view. That means we will
traverse view tree many times. If the requested size of view list is
large, it shoule be a performance issue. We refine to find views in
sinslge traversal in this change.

Use a sample app with many views and layouts and compare the time of
two implementations. The average time of original solution is 300000
~ 600000 ns. The new approach is 150000 ~ 300000 ns.

Bug:178989965
Test: Write a sample app with many views and complicate structure,
see bug for test sample screenshot. Compare the execute time of two
implementation.

Change-Id: I5a051740ad40e77ed4a54294368031eb82ab87ab
parent b8737dac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment