Skip to content
Commit 6c5d9a1a authored by Songchun Fan's avatar Songchun Fan
Browse files

SettingsProvider enhanced cache

Instead of one generation tracker per table, we now use one generation
tracker per setting.

Change overview: https://docs.google.com/document/d/1Hoqnyu-zdqlcqoQPcan2cuV45pXxh_dLtI0kOsOVuX0/edit?resourcekey=0-UoWA1aosEP-04skWe3Ylsw

The testSettingsValueConsecutiveRead now performs 10x better because the
update of one setting doesn't invalidate the caches of other settings.

+ Changed server caching behavior so that nothing is cached until a
  setting is queried.

+ Also moves cache check to before the readable check to further reduce
  read-access time, since if a setting is cached, it must be readable
  for the caller process.

BUG: 228619157
Test: atest com.android.providers.settings.GenerationRegistryTest
Test: atest SettingsProviderTest
Test: atest SettingsProviderPerformanceTest
Test: atest android.provider.NameValueCacheTest
Change-Id: Ie519dadadc13c7211a0f1f5de53f498dfc6edf77
parent 52a61a8b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment