I'm using toolargetool to investigate why the app is crashing from TransactionTooLargeException.
I'm seeing there's this key androidx.lifecycle.BundlableSavedStateRegistry.key which can be around 400 KB when I put the app into the background.
What is this key and where is it coming from? How can I reduce the size of this in the bundle?
In my case, here are the things that was stored there:
I recommend you to debug this yourself because stored things and their sizes will be different for your project.
To debug:
TooLargeTool.bundleBreakdown()function. In the breakpoint, you can also use a filter like:KB(totalSize) > 500so that it will stop at breakpoint only for the large sized Bundles such as Bundles that are larger than 500 KB.In the breakpoint try evaluating code like this:
You can of course also see the bundles in the IDE's Debug window, but it will be difficult to see the Bundle keys and sizes.
This way you can find out exactly what takes up space in this Bundle with key
androidx.lifecycle.BundlableSavedStateRegistry.key