When SavedStateRegistry is asked to performSave, it unconditionally calls putBundle even if there are no components that were registered to save their state.
This means that in cases like Fragments, where the Fragment itself has a SavedStateRegistry and the fragment's view has its own SavedStateRegistry, 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.
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.