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
Loading
Please register or sign in to comment