Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 47112c62 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent 3164ec8d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment