summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Jeremy Meyer <jakmcbane@google.com> 2023-06-08 22:54:30 +0000
committer Cherrypicker Worker <android-build-cherrypicker-worker@google.com> 2023-06-12 17:43:34 +0000
commita9ef8767e2c800fd3ad15e746543456963260859 (patch)
treeae701263c2b5ff05fbf540457d5ffc69be1f5b77 /libs/androidfw/StringPool.cpp
parent67c8f87df07967f667852b0d0cd342b0a1c14e3a (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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions