bitfireAT / davx5-ose

DAVx⁵ is an open-source CalDAV/CardDAV suite and sync app for Android. You can also access your online files (WebDAV) with it.
https://www.davx5.com
GNU General Public License v3.0
1.27k stars 69 forks source link

About activity is slow / stutters after rewrite to Compose #470

Closed mbiebl closed 6 months ago

mbiebl commented 6 months ago

Version: 4.3.10-beta.1

The About activity has been rewritten using Compose. Switching between the tabs "DAVx5", "Translations" and "Libraries" has become rather slow. Where the animations previously were smooth it now lags and stutters. This is on real hardware (Pixel 4a).

ArnyminerZ commented 6 months ago

The movement is right now being performed using the scrollToPage function. See:

https://github.com/bitfireAT/davx5-ose/blob/0c1e4fd3cbba3920ad198d388db552473e5a1a83/app/src/main/kotlin/at/bitfire/davdroid/ui/AboutActivity.kt#L126

I suggest using PagerState#animateScrollToPage.

About the lag, please, can you provide a video showing it? For me it's working perfectly both on emulator (Pixel 3a) and my personal phone (Pixel 6a)

mbiebl commented 6 months ago

I made a screencast, which doesn't quite capture the user experience though. It feels like the UI lags a bit. What you can probably see though is that the first time I swipe to the left, the UI hangs for a few milliseconds.

https://github.com/bitfireAT/davx5-ose/assets/3609611/445686bf-a39e-4737-aa14-be093ae2d3d1

ArnyminerZ commented 6 months ago

Okay, I see, I'll take a look ASAP

mbiebl commented 6 months ago

Thanks a lot. It's a minor issue, for sure and I can understand if you need to focus your resources on more pressing issues first.

ArnyminerZ commented 6 months ago

Should improve with #471. Not a lot, but hopefully it's enough

mbiebl commented 6 months ago

I tried with a release build instead of a debug build, and it works better. As the debug build is not really relevant for the final product, I'm closing this bug report.

ArnyminerZ commented 6 months ago

I tried with a release build instead of a debug build, and it works better.

Actually there's a noticeable difference in performance between release and debug builds with Compose. Not sure what affects it, but for sure it's a thing, so maybe that was your issue.

Whatever the case is, I think #471 is still rellevant and a change to be made.

mbiebl commented 6 months ago

Just curious: Is it ok if I continue filling issues here or does this just create unnecessary work?