Closed j2esu closed 3 months ago
Yeah I suspect this is due to the snapshot system and both us and Compose UI launching a coroutine to apply snapshots periodically, but would have to confirm that. It also means that we likely can reproduce this in pure Compose (i.e., no Molecule) and potentially file a bug upstream.
I do not have time to look at this any time soon. If no one else does, I'll get to it eventually.
This has also hit us pretty hard at Cash. We're raising the issue with upstream.
It also means that we likely can reproduce this in pure Compose (i.e., no Molecule) and potentially file a bug upstream.
Tested with androidx.compose.runtime:runtime:1.7.0-alpha06. Looks fixed to me, no more ANRs.
According to the docs RecompositionMode.Immediate can be used "for running molecules off the main thread". When I try to use it with any non-main dispatchers (tried Default, IO, new single thread dispatcher) my app freezes and then gives ANR when I scroll any LazyColumn. I don't even use the result of molecule to render the list, just any call to molecule affects lazy lists that way. Please let me know if I'm doing something wrong.
Molecule 1.4.1 Compose compiler 1.5.10 Compose UI 1.6.2 Android SDK 34
MRE: