diff options
| author | 2024-01-09 17:42:41 +0000 | |
|---|---|---|
| committer | 2024-01-16 15:59:12 -0500 | |
| commit | a48795b336c5447c9693498593b6d08c7c482eea (patch) | |
| tree | 391e59a0de28b5487d4f918c816eb89b9aa647e1 /libs/androidfw/StringPool.cpp | |
| parent | 4881667c6c253b990f59067b129bb34171263874 (diff) | |
Optimize default value loading.
Previously, we were loading all aconfig default values
into the ArrayMap backing SettingsProvider. This was
causing boot regressions. It was likely because this
would make any calls to `getAllConfigFlags` much more
expensive; this function was looping through all
SettingsProvider flags and doing a prefix check, _every
time_ it was called.
This change loads defaults into buckets keyed by the
namespaces of the defaults, in a new in-memory structure.
This way, `getAllConfigFlags` needs to just look up the
defaults for its namespace, when doing a namespace-level
call. This doesn't optimize anything when we get every
single flag, but from some investigation, there's never
a time this gets invoked in the boot process.
Test: atest SettingsStateTest
Bug: 318514727
Change-Id: I3915ae589de01a09cd959c8b79859f7e4ce65285
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions