Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
See attached project. This is a very barebones example, this observation came up in a very big and complex project. When I use Modifier.clickable{} on a component like Text, or Icon, or Card, etc, it is getting recomposed along with other recompositions rather than skipping this. As far as I understand the clickable composable did not change, so there should not be any recomposition happening. I do not know how much of a performance issue this is in a very complex scenario where a Lazycolumn with multiple clickable texts are being recomposed due to some numbers next to the clickable texts are updating every 10s.
A more real life example: have a list of 1-500 items, each of them have a clickable (underlined) text, that would show a popup, and a number. The clickable text is added due to the fact that the onClick and onLongClick on the entire item is already reserved for other actions. The numbers are being fetched every 10s from the API so they update the items accordingly. In this scenario the Text with clickable also gets recomposed when the number does, according to the LayoutInspector.