diff options
| author | 2025-02-14 00:24:50 +0800 | |
|---|---|---|
| committer | 2025-02-18 15:08:25 +0800 | |
| commit | 47112c6299e196df53741eba86e123905999ddcd (patch) | |
| tree | 48fe9422992a99ff0841b15823f4da1d4d3f2284 /libs/androidfw/AssetsProvider.cpp | |
| parent | 3164ec8d447a423d5b80f0d3c8a69c7d07e3a146 (diff) | |
Improve window style cache
The cache replied on AttributeCache, but because it caches entire
TypedArray (it may be big), it only preserves a few packages.
Then it may need to read from package resources frequently, which
may add latency when starting activity:
AttributeCache > createPackageContextAsUser
 > createResources > getResources
  > createApkAssetsSupplierNotLocked > loadApkAssets
By only storing the used attributes, the size of cache becomes
very small which can be preserved per boot session.
Bug: 350394503
Flag: com.android.window.flags.cache_window_style
Test: atest ActivityRecordTests#testReadWindowStyle
            WindowStyleCacheTest
Change-Id: Ib5a9fc68a9b6340920ea9c8c7849bd9032642e17
Diffstat (limited to 'libs/androidfw/AssetsProvider.cpp')
0 files changed, 0 insertions, 0 deletions