https://kotlinlang.org logo
#compose
Title
# compose
m

mon

02/08/2020, 4:24 AM
Is there a way to batch
@Model
mutations so that the component sees multiple var changes at the same time?
I guess this isn't an issue if the mutations all happen in the UI thread
a

Adam Powell

02/08/2020, 5:45 AM
Right, only one pass of recomposition per frame is happening today. Once we start doing more concurrently there will be some more specific scoping functions for model transactions
Which will apply to more than just composition, but any frame observers
👍🏻 1
l

Leland Richardson [G]

02/08/2020, 5:28 PM
and if it wasn’t already clear, all @Model mutations are “batched” already in that recompositions as a result of those mutations are batched. The batching is done right now essentially once per animation frame (usually 60hz).
3 Views