dweymouth / supersonic

A lightweight and full-featured cross-platform desktop client for self-hosted music servers
GNU General Public License v3.0
885 stars 45 forks source link

Scrolling in app is laggy/unresponsive with certain mice #418

Open kimjongbing opened 3 months ago

kimjongbing commented 3 months ago

OS: Arch Linux DE: GNOME 46.3.1 WM: Mutter (Wayland)

When I click the scroll rectangle thing and drag it to scroll up/down there is a big delay.

dweymouth commented 3 months ago

I have not seen this happen or had it reported before. Are you using Supersonic via a native Wayland build (which is still experimental) or through xwayland? Also, which view is slow to scroll? (tracklists, grid view, or both)?

kimjongbing commented 2 months ago

I have not seen this happen or had it reported before. Are you using Supersonic via a native Wayland build (which is still experimental) or through xwayland? Also, which view is slow to scroll? (tracklists, grid view, or both)?

On the grid view it is really slow and laggy, on the track view its fast but also laggy. Kinda hard to describe

I'm using the bin here from the AUR https://aur.archlinux.org/packages/supersonic-desktop-bin

dweymouth commented 2 months ago

Maybe a screen capture may be helpful. I can't reproduce this on any of my systems so a video might help to get a sense of what could be going on.

kimjongbing commented 2 months ago

Maybe a screen capture may be helpful. I can't reproduce this on any of my systems so a video might help to get a sense of what could be going on.

https://github.com/dweymouth/supersonic/assets/126769537/0e4ad93e-bfbc-4760-8715-35883f958412

kimjongbing commented 2 months ago

After I start scrolling I take my mouse off the scroll bar and it keeps going on its own. You can't see my cursor in the video but it's not on the scroll thing

dweymouth commented 2 months ago

Oh, do you by chance have a mouse that reports an insanely fast rate like 1000 Hz? I remember someone else having a similar issue with a different app built with the same toolkit (Fyne). If so, unfortuantely there might be no fix right now other than to use the keyboard arrows to scroll instead, or changing your mouse speed. Eventually, the toolkit will have to do some internal handling to not respond to every scroll request if they come in too fast. I will try to see if it's been reported there as a bug and get it prioritized.

kimjongbing commented 2 months ago

Oh, do you by chance have a mouse that reports an insanely fast rate like 1000 Hz? I remember someone else having a similar issue with a different app built with the same toolkit (Fyne). If so, unfortuantely there might be no fix right now other than to use the keyboard arrows to scroll instead, or changing your mouse speed. Eventually, the toolkit will have to do some internal handling to not respond to every scroll request if they come in too fast. I will try to see if it's been reported there as a bug and get it prioritized.

no i dont think my mouse has an insanely fast rate. is there a way to check reliably? i have 800 dpi also

subpanic commented 2 months ago

Wanted to tack on that I'm similarly experiencing jumpy/laggy scrolling on an M1 Pro Macbook Pro when scrolling with the trackpad. MacOS version is Sonoma

dweymouth commented 1 month ago

For those seeing this issue, does it happen on all scrollable views, or only on the tracklist or only in grid views? I cannot reproduce the issue at all with grid views, and with list views it is just a tiny bit unsmooth on my M1 Macbook with the trackpad

subpanic commented 1 month ago

https://github.com/user-attachments/assets/4eecba55-0a98-4e61-90ae-a98742e9315c

It's unsmooth scrolling in all views, the more prominent jumpy/stuttering scrolling is on the grid views. The artists view in this screen really shows it, very jumpy, like the content is constantly changing.

dweymouth commented 1 month ago

Oh, OK I think the "jumpy" scrolling is a separate issue from the "laggy" scrolling. I had honestly just gotten used to it, but it's from the UI toolkit's scroll accelerate logic - when scrolling faster than a certain fixed speed, it multiplies the scroll speed by an acceleration factor to accelerate it further. This maybe could either be disabled for Mac, if MacOS handles scroll acceleration itself anyway, or else improved to a more smooth function with no discontinuity.

I created an issue in the UI library for this

dweymouth commented 1 month ago

Jumpy scrolling on Mac will be resolved when https://github.com/fyne-io/fyne/pull/5068 is merged in