| commit | a24e8f9563c915e061cd875a74b072b1b538e1d2 | [log] [tgz] |
|---|---|---|
| author | Jiakai Zhang <jiakaiz@google.com> | Wed Apr 12 18:34:59 2023 +0100 |
| committer | Jiakai Zhang <jiakaiz@google.com> | Tue Apr 18 14:24:41 2023 +0100 |
| tree | fb2a0e7ff8168068821e51c78f98c6656441f335 | |
| parent | c45924ef35ae2d0f9fc39234f100ccf426afaf69 [diff] |
Optimize notifyDexContainersLoaded. The implementation was inefficient and was suspected to bloat the heap with a lot of short-lived objects. This CL tries to optimize it. - Cache secondary dex locations. - Replace stream usages with for loops in hot methods. Before: https://screenshot.googleplex.com/8QKVzEDtas85Wfk After: https://screenshot.googleplex.com/4BTeXdKMNNfSccf (The tracing code was added temporarily during local development, and is not included in this CL.) Bug: 276333355 Test: atest ArtServiceTests Ignore-AOSP-First: ART Services Change-Id: I9a4f8e4d2bcbf058d6e60b6de63e41c7119b9145