Hi! I read in the documentation for rememberSaveab...
# compose-android
j
Hi! I read in the documentation for rememberSaveable that one should be careful with the amount of data read/written since it could slow down the UI performances. It also said one should consider viewmodels instead. But as far as I know, SaveStateHandle also uses a read/write solution. Are there any significant differences between the two mechanisms or is it because viewmodels do the reading/writing in a different coroutine/thread?
j
I thing the issue with
rememberSavable
is that it’s a Composable so maybe it could affect
Composition
time? IE slow down your UI.
j
both save stuff in a Bundle in the main thread, the biggest limitation is the Bundle size (around 1MB, I think), so don't save huge lists (lists of products for instance would be no no) there.
💯 1