Open bitmage opened 1 year ago
I'm also having quite slow frame rates on a galaxy s20
The initial problem seems to be on chat. @frnandu is chat slow for you as well?
Yes, similar as the feed.
I've commented a bunch of components being rendered on the feed (left just one icon of reply), and still scrolling list of feed is slow and horrible UX. Phone Galaxy S20. So something is terrible wrong that even without rendering content the UI is lagging so much on a not so much old phone....will investigate further to try to find out the reason of such lagginess...
Please do. I have been staring at the code for far too long looking for any leak to the Main thread.
Old phones seem to deal with clickable regions extremely bad (2ms + for each clickable icon on the screen). I am not sure if there is a fix for it. I am also investigating memory leaks inside the AsyncImage class from Coil that seems to send images to the GPU and not delete them in some cases. This seems to happen more in old phones. So maybe there is a missing GL call (or an existing call that is not implemented in older phones) somewhere in the framework.
On which phone(s) do you develop/test?
Pixel 6 and 7. Soon on Pixel 8.
No lagging on pixel 6?
It seems fine. It's a 2-year-old phone and definitely not at its prime anymore. Performance feels similar to other apps.
I'm comparing amethyst and primal code base, since theirs smooth/responsive-ness on scrolling feed/lists in my s20 is perfect. They also have images (maybe a different lib tough) and a lot of clickable regions.
Another nostr client that also has perfect smooth scrolling on my phone is https://github.com/haorendashu/nostrmo (uses flutter).
Which means IT IS possible with this hardware to have smooth scrolling.
One big difference I see in primal's code is they do not use LiveData.
Is it possible that using the approach of MutableStateFlow instead of LiveData would help this issue?
I'm just brainstorming ideas/possibilities to investigate, since I don't have much experience in android/kotlin/compose, but I would really like to get to the bottom of this issue and resolve it, since I see a lot of people complaining about scrolling lag on amethyst and I think people with phones older than 1-2 years are still the majority out there.
Only Amethyst has this problem. Primal, Snort app, Snort PWA and Plebstr have buttery smooth scrolling. Using Samsung Galaxy Note 10+. Hope this gets fixed soon, I still use Amethyst the most.
Describe the bug
The client is having slow frame rates for me. It doesn't seem to be the data loading, but just scrolling and animations in the UI.
To Reproduce
Expected behavior
Smooth animations.
Device: