Closed cody1024d closed 7 years ago
Yet that looks too big. Are you saving other stuff but view states?
Nope not really. Setting Max Pages is working for now, thank goodness I found that API.
Although it is a little concerning that at a certain point, a controller hierarchy can become too complicated for the library to handle. I'm not even sure how/if this could be fixed. To me, something like that should probably be in some documentation somewhere, though.
Yes, that should be the same with fragments :-/ Btw the max pages came from my initiative because I faced the same problem ;-)
Man, I swear I searched for this issue, and didn't see it. Thanks @PaulWoitaschek.
Trying to figure out the best practices surrounding this situation. It looks like, when my main activity is stopped, it's trying to create a bundle that is too big (upwards of 590kb). I'm using the TooLargeTool to see the size, and it looks like the LifecycleHandler.routerState is upwards of 400kb easily.
Here is a rough outline of my controller heirarchy, and their related bundle sizes:
MainActivity (RouterAdapter)
Essentially, from a UX design standpoint, I have a main tab bar at the bottom that separates main sections of the application (the Main Activity's router adapter). Each of these individual sections has the chance to have their own tab sections within them, as well.
When I'm viewing one of these "inner" tabs, and the activity is stopped (say, screen is locked), the bundle that is created is very, very large. I see I can set the "maxPagesToStateSave" on the adapters; is this the only solution to this problem?
Edit: Setting the max page does indeed help this issue, and does fit my use-case (as the inner tabs don't need to save the backstack). Closing this issue