is not inferred as stable).
There’s also a recommendation before somewhere here in this Slack that we shouldn’t be worrying about manually adding
@Stable
and
@Immutable
normally, so I’m wondering if we should start doing so (since not worrying about it led to performance issue)
allan.conda
06/16/2022, 10:11 AM
And I’m not sure the official docs talk about using
@Stable
and
@Immutable
yet to improve performance
b
Ben Trengrove [G]
06/16/2022, 9:58 PM
If you have a composable that takes List<> as a parameter then that composable will never be skipped. Most of the time this won't matter but for composables that get recomposed a lot it starts to matter. I don't think I would go as far as replacing all lists in your app with immutable ones, but you could consider it for ones where you are measuring a performance penalty. Same goes with marking your model classes with Stable and Immutable, don't just do it blindly, do it when it has a measurable performance improvement