jerboa icon indicating copy to clipboard operation
jerboa copied to clipboard

Scrolling seems to sutter/lag on latest version (0.0.32)

Open MrBruz opened this issue 1 year ago • 13 comments

This suttering/lag/jerkyness shows itself on both posts and comments, this is running on a Samsung a32

I checked logcat but unfortunately I am seeing no errors about jerboa, I do see an related scroll warning come up which I will link below.

image

I am also willing to put a $50 usd (monero) bug bounty on this for whoever can fix this issue.

MrBruz avatar Jun 07 '23 03:06 MrBruz

This seems to be just slowness with jetpack compose. I've tried a lot of things to make it better, adding keys to the LazyLists, hiding the scrolling indicators, etc, but nothing seems to make it much better.

dessalines avatar Jun 07 '23 19:06 dessalines

Upping the bug bounty to $100 usd

MrBruz avatar Jun 07 '23 22:06 MrBruz

Is the UI meant to be recomposed when scrolling? image

MrBruz avatar Jun 09 '23 02:06 MrBruz

I believe so yes, lazycolumn loads new content dynamically.

dessalines avatar Jun 09 '23 02:06 dessalines

It should also be noted that this is being triggered when scrolling back over existing comments that have been previously loaded

MrBruz avatar Jun 09 '23 08:06 MrBruz

@oscarnylander is it possible that downgrading that android gradle plugin AGP made performance worse?

Granted, scroll-stuttering was still an issue before that.

dessalines avatar Jun 09 '23 20:06 dessalines

I'd consider it to be pretty unlikely. I guess profiling a build with the alpha-variant versus a build without would reveal whether it's the case, though.

oscarnylander avatar Jun 09 '23 20:06 oscarnylander

Dumb question as I'm not super familiar with Jetpack Compose/Android app dev, but should there be a Debug and Release build profile of some kind, the latter turning on all optimisations and removing debug symbols/aids etc?

Edit: This is what I'm referring to: https://developer.android.com/studio/run#changing-variant

From what I can tell, the default app build profile is just using 'debug'. Perhaps the build process for generating the APK uses 'release', but I'm not sure. One of the project admins might know.

There's more info here too: https://developer.android.com/jetpack/compose/performance

a1studmuffin avatar Jun 10 '23 01:06 a1studmuffin

You are correct, debug builds will affect performance a lot as far as Compose is concerned.

I'd assume that the final build that makes it out to release channels already is built using a release configuration, though.

oscarnylander avatar Jun 10 '23 05:06 oscarnylander

Going from the stable 0.0.33 to the latest 0.0.34 build introduced a ton of lag and jerky scrolling too.

kabe-inc avatar Jun 14 '23 03:06 kabe-inc

I think someone needs to do some profiling in Android Studio while scrolling in Jerboa, and spend some time going through the results to see if there's any way we can reduce the amount of composition/layout going on.

There's some good docs on the subject here:

https://developer.android.com/jetpack/compose/performance https://developer.android.com/jetpack/compose/phases

Unfortunately I don't think there's going to be a quick fix - it'll likely be death by a thousand cuts causing the lag, so will probably require lots of little optimisations to existing code to make it more efficient. Hopefully there's a little bit of low hanging fruit though.

a1studmuffin avatar Jun 15 '23 13:06 a1studmuffin

I don't know if this is worth anything but since this is such a diffuse issue I'll try to collect reports of users with their Device and Android version. Maybe it shows a pattern

Device Android version Jerboa version Comment
Xiaomi Mi A2 Lite 13 0.0.34 Scrolling not smooth
Samsung S21 ? ? Butter smooth
Galaxy Tab S8 Plus ? ? Butter smooth
OnePlus One LineageOS 18.1 (Android 11) 0.0.34 Scrolling is laggy
Galaxy Tab S6 Android 12 0.0.34 Super laggy

sockenklaus avatar Jun 20 '23 17:06 sockenklaus

Scrolling is laggy (but usable) on 0.0.34 on Android 8.1 on Xiaomi Redmi 4 Prime

Cdsi37 avatar Jun 21 '23 15:06 Cdsi37

Not sure how to help but wanted to add that it lags a lot on s22+ snapdragon variant.

optimusam avatar Jun 22 '23 17:06 optimusam

Any updates on this? This is my main problem with Jerboa, it just makes it uncomfortable to use the app.

Also, I'm on a Oneplus 7T Pro with LineageOS for microg 20.0.

bblacher avatar Aug 16 '23 17:08 bblacher

Also happens on a Pixel 8 Pro on CalyxOS. This makes the app unusable for me.

bblacher avatar Dec 24 '23 22:12 bblacher

What version?

dessalines avatar Jan 04 '24 17:01 dessalines

Happens on 0.0.55, happened to me ever since I first tried this app in July. I checked if the bug was gone every now and then but nothing fixed it. This makes jerboa unusable for me.

bblacher avatar Jan 04 '24 19:01 bblacher

I'm using jerboa on multiple android devices, with different android versions. This seems like it would affect every single jetpack-compose app that uses LazyLists for specific android versions / OSs.

Could you post a video?

dessalines avatar Jan 04 '24 19:01 dessalines

Here you go. This only happens to me with jerboa and it happens on both my phones.

https://github.com/dessalines/jerboa/assets/42916911/fe4933d7-f6dc-403b-b2ad-d9aef4f18b3f

bblacher avatar Jan 04 '24 19:01 bblacher

Stale issue. Can re-open if we find specific cases, but we're mostly limited by jetpack compose's lazylist.

dessalines avatar Feb 10 '24 21:02 dessalines