strawberrymusicplayer / strawberry

:strawberry: Strawberry Music Player
https://www.strawberrymusicplayer.org/
GNU General Public License v3.0
2.54k stars 165 forks source link

(macOS) High CPU Usage when scrolling in Playlist View on a high-DPI Retina Screen #542

Open Tibokan opened 3 years ago

Tibokan commented 3 years ago

Describe the bug Probably a macOS, QT-specific issue (as it also exists on Clementine 1.3.1), but scrolling in Playlist View (even when not playing any tracks in the background) is very choppy in performance, with large CPU spikes and a tanking framerate (down to 8-10 frames on my high-spec Mac Pro, worse if glowing track animation is turned on, and there is a large list to scroll through). Scrolling the playlist view with a track playing will also tank the framerate of the block analyser.

To Reproduce Add a list of songs to Playlist Views and scroll using mouse wheel.

Expected behavior Scroll smoothly, as there shouldn't be anything CPU-heavy happening when scrolling a relatively static/non-dynamic playlist view.

System Information:

foss- commented 2 years ago

Version 1.0.2-8-gd40a67ce, scrolling playlist like mad -> CPU over 90% Version 1.0.2-28-g8557d835, scrolling playlist like mad -> CPU at 99%

Sadly cannot confirm a fix for high CPU usage when scrolling.

foss- commented 2 years ago

Version 1.0.4 scrolling up down still goes to ~99% CPU

jonaski commented 2 years ago

Can you try the latest from https://builds.strawberrymusicplayer.org/macos/ those have Qt 6.3.0 (instead of Qt 6.2.x).

foss- commented 2 years ago

macOS 12.3.1 Strawberry 1.0.4-5-g907dfee6 Scrolling up down like crazy still results in CPU ~100%. https://bugreports.qt.io/browse/QTBUG-73117 however still unresolved and with last update early dec 2021.

jonaski commented 2 years ago

QTBUG-73117 is closed and the latest fix was https://codereview.qt-project.org/c/qt/qtbase/+/403699 which should be in Qt 6.3.0. I doubt we will get this fixed in Strawberry unless someone with a mac volunteers to debug it and report it to Qt with a minimal code example that can reproduce it. Since there aren't any contributors here with mac, I doubt we will get this fixed any time soon.

jonaski commented 3 months ago

Since I got a Mac Mini M2 now I've tested with a Samsung UHD TV on resolution 3840 x 2160, I can reproduce high CPU usage when scrolling.

jonaski commented 3 months ago

I'm pretty sure this is a Qt specific issue, lyx (https://www.lyx.org/Download) also exhibit the same behavior, over 60% CPU when scrolling.

jonaski commented 3 months ago

I've reported this to Qt here: https://bugreports.qt.io/browse/QTBUG-123343