This may be an odd question. Would updating all states versus just one at a time consume more battery?
I.e. Could it be that MVI is less battery efficient than MVVM since all states are updated every-time one state changes, rather than only the changed state being updated when it changes?
g
ghedeon
02/24/2019, 8:33 PM
Yes, I'd expect a higher memory consumption and memory churn in MVI, because of the constant mutation of the state plus all the intent objects/singletons. Hard to tell without profiling if it's that big of a problem for the battery.
s
Shalom Halbert
02/25/2019, 5:06 AM
Thank you for the input 🙂
s
Sam
03/07/2019, 12:56 AM
Technically, this is not a pitfall of MVI per se rather on the rendering logic. Flutter for instance deals better on UI updates
Databinding helps to an extent. RecyclerView too has payload related API to give hints of the actual change