https://kotlinlang.org logo
#compose-android
Title
# compose-android
c

Colton Idle

11/16/2023, 12:50 PM
This might be a silly question... but something I'd use to do in the view system (like pre lollipop or something) would be to put a CircularProgressBar on the screen and if it stutters then you know you'd be doing something on the main thread. It was a trivial way to test for jank. This was later changed in views to render on the renderThread but you could disable the renderThread in the manifest or something. Is there a way to do that in compose? i.e. I just want to put a circular progress bar on the screen and see if some of my background code is causing jank.
z

Zoltan Demant

11/16/2023, 1:19 PM
StrictMode? 😃
y

yschimke

11/16/2023, 7:50 PM
Maybe wire up JankStats as a State and display that? Turn the frame metrics into something visible?
j

Joel Denke

11/16/2023, 8:24 PM
b

Ben Trengrove [G]

11/17/2023, 5:48 AM
You could also use the Profile HWUI rendering setting in developer options, it draws a graph on your screen to show jank https://developer.android.com/topic/performance/rendering/inspect-gpu-rendering
2
t

Tolriq

11/17/2023, 7:37 PM
HWUI for ever also help finding things like https://issuetracker.google.com/issues/297231233
2 Views