android / android/nowinandroid
[Bug]: Redundant full screen recompositions on UI state change
- Dominant language
- Kotlin
- Stars
- 21.8k
- Forks
- 4.6k
- Avg merge
- 19h 20m
- Merged PRs (30d)
- 2
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is there a StackOverflow question about this issue?
- [X] I have searched StackOverflow
### What happened?
When performing any sort of UI action that results in a state change, for example, toggling one of the options in the interests tab, the entire UI is recomposed even though only one item in the list needs to be recomposed. You can reproduce this easily by checking the layout inspector with the show recompositions toggle on and toggling one of the options in the interests tab.
### Relevant logcat output
_No response_
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Start by reproducing the issue in the interests tab and use Android Studio's Layout Inspector with the show recompositions toggle enabled. Trace the UI state change from the affected option and identify why the full UI recomposes; done means toggling one option recomposes only the necessary list item.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100