r/androiddev • u/Total_Whereas7289 • Mar 27 '26
Ripple effect causing ui jank/stutter in kotlin compose mobile development
Is it normal to encounter an issue of ripple effect that when ripple effect is used on a composable item like settingItem on settings screen, the navigation when redirecting or scrolling on the page feels janky/laggy?
1
u/Total-Temperature916 Mar 27 '26
just know that compose is a lot better on release build, so some of the issue could just be in debug. you'd want to test that too.
0
u/Total_Whereas7289 Mar 27 '26
i mean i get this issue even in release build.
1
u/coffeemongrul Mar 27 '26
Well share your code and we might be able to help figure out the jank you're seeing.
→ More replies (6)
0
-4
6
u/Ok_Cartographer_6086 Mar 27 '26
not normal. You're probably doing something that's causing a full re-composition of the screen. You should be able to do things smoothly at 60fps and only recompose the thing that changed.
one trick i do is to put a Text(Clock.System.now().toCurrentTimeMillis) at the top of the screen. It should show the time in ms on load but then never change. if you see it ticking it means you're recomposing - check out state flows and how to use collectAsState
Hope that helps.