shikasd
06/26/2020, 11:58 AMaddChangesAppliedObserver
in composer on dev-14, but actually open for external listeners 🙂
The use case is that whenever changes are getting applied, they can result in multiple small updates. I wanted to batch them, so I could dispatch events more efficiently.Chuck Jazdzewski [G]
06/26/2020, 3:34 PMaddChangesAppliedObserver
is current unused even internally and I was planning on removing it.shikasd
06/26/2020, 3:47 PMshikasd
06/26/2020, 3:57 PMLeland Richardson [G]
06/26/2020, 4:44 PMLeland Richardson [G]
06/26/2020, 4:45 PMshikasd
06/26/2020, 5:18 PMshikasd
06/26/2020, 5:19 PMLeland Richardson [G]
06/26/2020, 5:40 PMDoes coroutine based recomposer means that you are going to support composition on background threads on Android?That’s the idea 😉
Chuck Jazdzewski [G]
06/26/2020, 5:44 PMFrameManager
(also in flux) notify the recomposer of the change whenever the an apply()
of a snapshot occurs. The recomposer then schedules a recomposition to be take place. For the UI, this is on the pace of the Choreographer
at ~16ms intervals.
However, the recomposer is in charge of when and how often this occurs. If you have your own recomposer it would control the pace.
We are making this much easier to work with as we are using suspend
functions and the goal is that the recomposer is just a suspend
function that calls recompose
in a loop. The UI call waitFrameMillis()
once it detects a change.
In your case you would just call something else to pace the changes instead of waitFrameMillis()
.shikasd
06/26/2020, 6:09 PM