commit | a9ef8767e2c800fd3ad15e746543456963260859 | [log] [tgz] |
---|---|---|
author | Jeremy Meyer <jakmcbane@google.com> | Thu Jun 08 22:54:30 2023 +0000 |
committer | Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Mon Jun 12 17:43:34 2023 +0000 |
tree | ae701263c2b5ff05fbf540457d5ffc69be1f5b77 | |
parent | 67c8f87df07967f667852b0d0cd342b0a1c14e3a [diff] |
Improve performance of generations in the resource cache Tracking generations in the resouce cache caused a performance regression, likely from allocating an Entry object for every resource retrieval. This optimizes that by having the retrieval of the value be separate from retrieval of the generation. This makes it so that on cache hits there is no difference from before the generation change and a cache miss only adds the overhead of a method call to retrieve an int. Test: ran with forest to determine improvement Fixes: 285575799, 285489092, 285730765, 285607129, 285489541, 285943600 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:094f7289f1ae341bbb9fdbb17f2aff66e507dbfd) Merged-In: I5144f08bb38d0e600b7f556df834292e50afb91c Change-Id: I5144f08bb38d0e600b7f556df834292e50afb91c