dimsuz
12/06/2020, 10:26 PMList<User>
where User(id, name, isSelected)
and if this list is 100-200 users, then to immutably switch selection of 1 user costs a full realloc of whole List + 1 user object.
In light of this I tend to split into something resembling Pair<List<User(id, name)>, Set<String>>
, i.e. "static" user props and "dynamic" set of selected ids.
It doesn't seem to be Compose specific, but I wonder, is this a good thing to do in general, or will ART optimize this anyway? And also: is there some terminology invented for this rather than mine static/dynamic thing?Tash
12/06/2020, 10:29 PMdimsuz
12/06/2020, 10:32 PMAdam Powell
12/06/2020, 10:36 PMdimsuz
12/06/2020, 10:37 PM