Tash
09/23/2021, 6:41 PMMutableState fields might not be scalable for a system with a lot of tokens. Thinking about possible approaches, esp ones that minimize recompositions as much as possible, such as maintaining a Map<Token, MutableState<Color>> etc…Would love some suggestions on this 🙏🏼Vinay Gaba
09/23/2021, 8:04 PMTash
09/23/2021, 9:12 PMMap<Token, MutableState<Color>> instead. This way, one could query for a particular kind of color, and access it’s corresponding MutableState<Color> … But I’m not sure if it is problematic to have MutableState as a map entry in this particular case…Vinay Gaba
09/23/2021, 9:20 PMmutableStateMapOf that might be useful for you but I haven't tested its behavior. Definitely worth testing with that!Tash
09/27/2021, 10:34 PMMap<SemanticToken, MutableState<Color>> , etc. will see how it goes.
trying to measure recomp here by logging in a SideEffect or something