summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorSongchun Fan <schfan@google.com>2022-05-05 19:13:31 +0000
committerSongchun Fan <schfan@google.com>2022-05-07 00:02:16 +0000
commitd5c4c550e414c0218f9f2c4a44b6fde3f8bb0c0e (patch)
tree3f63b9ddb86e3d83be81c2f282e1df5bc4edba2d /core/java/android/inputmethodservice/InputMethodService.java
parent455e490d94727a375bb78caba6599dd4248e51f4 (diff)
[snapshot] optimizing WatchedArrayList snapshot
ArrayList.add(index, value) does an array copy everytime to extend the underlying array. Here we already knew the size of that array and ensured the capacity so we should only call ArrayList.add(value) which does not involve array copying. We need to examine other Watched* classes and try to spot performance issues like this. BUG: 231373522 Test: forrest run Change-Id: Iab440fc809072e9b1ee1bef7d69a0dc04207bafb
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
0 files changed, 0 insertions, 0 deletions