Last active
October 7, 2022 19:49
-
-
Save Skyyo/d2c66193eceb7f8668ea9d1e8758fe63 to your computer and use it in GitHub Desktop.
perf_snippet_10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Immutable | |
class ImmutableListWrapper(val items: List<Int>) | |
// optimized using @Immutable marked ImmutableWrapper | |
@Composable | |
private fun WrappedLazyColumnApproach1(wrapper: ImmutableListWrapper) { | |
LazyColumn { | |
items(items = wrapper.items, key = { item -> item }) { item -> | |
Text(text = "item $item") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment