Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
After some review and discussion with ART, it doesn't appear that there's any issue with tracking our allocations as such, but it can happen that allocations we request don't occur due to optimizations at compilation time.
We may need a black hole, e.g. passing objects to JNI to ensure it's not optimized out.
Description
Component used: SavedState
Version used: 1.1.0
When unconditionally calls even if there are no components that were registered to save their state.
SavedStateRegistry
is asked toperformSave
, itputBundle
This means that in cases like Fragments, where the Fragment itself has a
SavedStateRegistry
and the fragment's view has its ownSavedStateRegistry
, the overall saved state is increased doubly so (at what seems like a cost of 0.2KB per fragment).While not a significant part of the total saved state, this can add up with deep stacks.