summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorJoanne Chung <joannechung@google.com>2021-02-24 00:10:10 +0800
committerJoanne Chung <joannechung@google.com>2021-02-25 18:41:50 +0800
commit401900c9b20dfaff1a32f28071022c4438c50880 (patch)
tree489df63acee762e13427f60d0b83ec8535d32f9c /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parentb8737dac2c10558a05a8df5e6882b110136d72f9 (diff)
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
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions