commit | 262c4cb24f61330a18fccdad96723d396f9a09e3 | [log] [tgz] |
---|---|---|
author | Cheng Li <chengxli@google.com> | Tue Aug 30 18:22:02 2022 -0600 |
committer | Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Thu Sep 22 12:49:11 2022 +0000 |
tree | 8f56b9d2c608f7812f4af6a894f52ab8c717a979 | |
parent | e6abc0922e543593bc2960e688cc70cd5fdae08a [diff] |
Reduce the frequency of calls to get_device_api_level This API call is made more than 100 times a second, and it's contributing to more than 1% of total CPU cycles in the Audio Codec HAL process. Given that this is static information that doesn't change frequently, we can move the API call to the constructor and cache the information to be used later. Test: manual testing by playing a video Bug link: https://buganizer.corp.google.com/issues/244443227 Change-Id: I35b215d834bd71d9c725b76dcbc0d9aa597faa34 (cherry picked from commit 47c2b5713a2af22940fb78b7230f344bb51ac3e2) Merged-In: I35b215d834bd71d9c725b76dcbc0d9aa597faa34