Add StringCache, and use it when unparceling Strings
StringCache is like String.intern() but weaker. The goal is to dedupe runtime string allocations, starting with parceled strings. This use case was driven by field stats for String allocations, many of which come from incoming parcels. Results from running this on a local test device: https://docs.google.com/spreadsheets/d/1HlLZTX88SPHHpjdKkDGI2wvS-vLhBLeSy6EfR9tXMXE/edit?usp=sharing&resourcekey=0-uNRHRp80IMmVqE0Oe1p7og Most processes are showing >80% hit rate. After this is merged, I will study the impact in trunk partial on heap size, post-GC metrics, and other memory KPIs. Flag: android.os.parcel_string_cache_enabled Bug: 442140362 Test: StringCacheTest Change-Id: I07912887d4564bc8cd3251b13d7102ff287a34df
Loading
Please register or sign in to comment