commit | f3903e9f15ac141299e75aefe956c270959e3c64 | [log] [tgz] |
---|---|---|
author | John Reck <jreck@google.com> | Fri May 12 17:12:54 2017 -0700 |
committer | John Reck <jreck@google.com> | Fri May 12 17:21:15 2017 -0700 |
tree | b2097e174e3e616b9735bed7c7825d549e09f2d2 | |
parent | f6d33e57c28fb8ff7cc58501ae4d1f014adb0603 [diff] |
Fix regression in getSharedPreferences performance Only do access checks if there's a cache miss. If there's a cache hit then those checks have necessarily already passed once so we don't need to repeatedly do them on every access. Before: timeCachedGetSharedPreferences_mean=126084 After: timeCachedGetSharedPreferences_mean=362 Test: ran perf test Change-Id: I51f0186f8e66c05ea0e5a457930377d1460dea17