Description[Android] Avoid unnecessray ObserverList compacting
Currently, when an ObserverList iterator is rewound or reaches the end
of the list, it will trigger list compacting. However, the majority of
the time, no compacting is required as no elements were removed.
Change the policy to only compact if an element was removed during
list iteration, avoiding unnecessary O(N) list walks.
BUG=440134
Committed: https://crrev.com/4fd0d810432901cfacf58ca054a11f9fd91b6dc5
Cr-Commit-Position: refs/heads/master@{#317725}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Code review #Messages
Total messages: 9 (3 generated)
|