Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] High gpu consumption by album moving labels. #175

Closed
1 task done
AlexSua opened this issue Aug 17, 2022 · 6 comments
Closed
1 task done

[Bug] High gpu consumption by album moving labels. #175

AlexSua opened this issue Aug 17, 2022 · 6 comments
Assignees
Labels
bug Something isn't working deployed This issue has been fixed/implmented and has been released

Comments

@AlexSua
Copy link

AlexSua commented Aug 17, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I am getting up to 60% of GPU consumption on an integrated Intel UHD Graphics 630 under Fedora using sway as the window manager. I usually don't have any problem reproducing 4k or other middle-intensive GPU tasks with other programs.

I have observed that the GPU-consuming task inside Spotube is the one in charge of moving long album labels such as this one:
image
with the following GPU consumption:
image

Whilst if I am in the search section without any moving label I get the following GPU consumption:
image

Expected Behavior

Optimizing the GPU consumption of these animations would be interesting so you can get a better battery performance and not interfere with the performance of other applications.

Possible solution: Stop the animation when idle and the mouse is not over the Spotube app or the album image.

Steps To Reproduce

No response

Spotube Version

2.3.0

Operating System

Linux

Linux Distribution (if applicable)

No response

Operating System Version

Fedora 36

Installation Source

Flathub (Flatpak)

Additional information

No response

@AlexSua AlexSua added bug Something isn't working good first issue labels Aug 17, 2022
@karniv00l
Copy link
Contributor

That's definitely a problem with Marquee widget, and it hogs the CPU/GPU around 40-50% on my end too.

@KRTirtho weird thing is that if you enable debugRepaintRainbowEnabled = true;, you will see whole app repainting 🤔. I've tried using RepaintBoundry widget, but it doesn't seem to do much.

@KRTirtho
Copy link
Owner

KRTirtho commented Aug 18, 2022

@karniv00l RepaintBoundary does work. It stops repaints in the Search page contents. But for some reason everything except the the Search page is getting repainted

Edit: you're right, it doesn't work at all 😑

KRTirtho added a commit that referenced this issue Aug 18, 2022
@KRTirtho
Copy link
Owner

KRTirtho commented Aug 18, 2022

I've made SpotubeMarqueeText to animate once on mount and stop after that. But when hovered over its parent Widget it'll again start to animate again until the mouse exits from the hover region. This works only in Desktop btw, for mobile devices nothing changed

@karniv00l
Copy link
Contributor

Weird, I'm curious if there's a proper fix for that, seems like a common thing to have a animation like that

@KRTirtho
Copy link
Owner

I don't know why but even a small animation inside a hello world flutter app utilizes the gpu heavily
Where firefox running YouTube doesn't even make the gpu to go over 10-20%

@KRTirtho
Copy link
Owner

KRTirtho commented Sep 9, 2022

The fix has been released. It's now available in v2.4.0

@KRTirtho KRTirtho added the deployed This issue has been fixed/implmented and has been released label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deployed This issue has been fixed/implmented and has been released
Projects
None yet
Development

No branches or pull requests

3 participants