summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorAnton Hansson <hansson@google.com>2019-04-30 15:21:24 +0100
committerAnton Hansson <hansson@google.com>2019-04-30 15:49:33 +0100
commit788ec75be534f93e94ea0cdd3031c40f450051f6 (patch)
tree26d4ee7fbfb84ee6330f08883c3c0810792d0aa3 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent46669aa717754cfd125da043eac71a9332ad5658 (diff)
Optimize FileSystemProvider.includeFile
When traversing a file tree using SAF, this method is called for every file in the tree, so wasted cycles add up to quite a lot of total time for large trees. Optimizations: - don't look up info not necessary by the cursor, by inspecting the projection columns - remove a few redundant double-lookups, of e.g. the File path - mark variables final where possible On my device/file tree, this reduces the total time spent in includeFile from ~33 seconds to ~22 seconds. This is where the majority of cycles are spent when traversing a dir with SAF. Bug: 130276310 Test: SAF test app Change-Id: Ibdfc335253a90eb87795a7a4eecb8b7b89601f09
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions