Files
Shai Barack c64df8c3b9 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
2025-09-12 11:50:55 -07:00
..
2025-06-10 13:23:36 -07:00
…

Ravenwood

Ravenwood is an officially-supported lightweight unit testing environment for Android platform code that runs on the host.

Ravenwood’s focus on Android platform use-cases, improved maintainability, and device consistency distinguishes it from Robolectric, which remains a popular choice for app testing.

Documents have been moved to go/ravenwood.