summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorKweku Adams <kwekua@google.com>2019-09-26 14:58:11 -0700
committerKweku Adams <kwekua@google.com>2019-09-26 14:58:11 -0700
commit2c31b6756f5f3b8cbe661909ea0ebc94b07601ef (patch)
tree721de72ebe642efe7573902e8b053f878ac2cd46 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent69235dcbec1d8b9d1213be91ec38d20f9132efa6 (diff)
Simplifying removeAll method.
JobStore.removeAll() iterates through an ArraySet and removes jobs that satisfy a predicate. The repeated removals will cause ArraySet to do many System.arraycopy calls and could cause the ArraySet to resize its internal array several times during the iteration. ArraySet has a removeIf(Predicate) method which does this exact task without repeatedly resizing the array or doing many System.arraycopy calls. Switching to ArraySet.removeIf will reduce the amount of code and improve performance in some cases. Bug: 141645789 Test: atest com.android.server.job.JobStoreTest Change-Id: Icbdcda219c115288d13a3508e8b4762783301eb0
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions