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

Skins :: fix CPU usage & end-of-track warning when waveforms are hidden/collapsed #1512

Merged
merged 3 commits into from
Feb 9, 2018

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented Feb 8, 2018

This fixes lp:1746475 "CPU usage doubles when hiding waveforms" in Deere & LateNight
and lp:1746110 "No end of track warning if Waveform Display not enabled" in Tango

Symptoms reported in lp:1748170 "Log file grows rapidly", log file is spammed with these entries:

Warning [Main]: QPainter::begin: Paint device returned engine == 0, type: 3
Warning [Main]: QPainter::setRenderHint: Painter must be active to set rendering hints
Warning [Main]: QPainter::setMatrixEnabled: Painter not active
Warning [Main]: QPainter::setPen: Painter not active
Warning [Main]: QPainter::setBrush: Painter not active
Warning [Main]: QPainter::setBrush: Painter not active
Warning [Main]: QPainter::setFont: Painter not active
Warning [Main]: QPainter::setPen: Painter not active
Warning [Main]: QPainter::begin: Paint device returned engine == 0, type: 3
Warning [Main]: QPainter::setRenderHint: Painter must be active to set rendering hints

Deere > CPU

set minimum container height in waveforms/decks Splitter to 4px. this has no effect in skin but is apparently sufficient to keep CPU usage constant

LateNight > CPU

load waveforms as Singleton, set minimum container height in waveforms/decks Splitter to 40px

Tango > end-of-track warning

load waveforms as Singleton and place it below decks with zero height if top waveforms are hidden

ronso0 added 3 commits February 8, 2018 12:30
…o 4px to prevent double CPU usage when waveforms are hidden
… decks 1/2 to allow end-of-track warning when waveforms in splitter are hidden
@daschuer
Copy link
Member

daschuer commented Feb 9, 2018

LGTM, Thank you.

@daschuer daschuer merged commit 3dace15 into mixxxdj:2.1 Feb 9, 2018
@MK-42
Copy link
Contributor

MK-42 commented Feb 10, 2018

I'm having strange symptoms since this is merged on my setup - not really knowing what is causing this behaviour.
In Tango and Deree, using the GL/GLSL mode for the scrolling waveform the whole framerate of mixxx drops to 1 fps as soon as the scrolling waveforms are hidden. If I show them, everything is running smoothly on ~30fps. As soon as they are hidden again, framerate drops and whole UI, including tooltips, menu and stuff is only rendered at ~1fps (also reported by the debug output in the waveform settings). Switching waveform type to non-GL types instantly 'revives' the UI.

I'm on arch linux, 4.15.1-2
Running Gnome 3.26.2, under X currently, will test with wayland later today.

Some investigation brought glfw/glfw#680 to my attention, could it be, that GL stops rendering the offscreen-buffer and some internal timers in the gui/skin are expecting refreshes via GL-events? I remember some discussion about gui-blinking and stuff depending on waveform rendering?

Edit: that behaviour is not only limited to mixxx. If I move the glxgears demo window offscreen, so that only the header of the window is visible, the reported framrate of that window also drops to 1fps. But I think mixxx should cope with the not-that-often-rendered, invisible waveform somehow and the rest of the gui should remain responsive.

@ronso0
Copy link
Member Author

ronso0 commented Feb 17, 2018

@MK-42 please file this issue at launchpad so it can be tracked.
Is anything waveform related spamming your log file? If not I can mark lp:1748170 fixed

@MK-42
Copy link
Contributor

MK-42 commented Feb 17, 2018

Logfile spamming is fixed. Ok, will report this on launchpad

@ronso0 ronso0 deleted the skins-waveform-CPU-fix branch February 22, 2018 11:09
@ronso0
Copy link
Member Author

ronso0 commented Jun 3, 2018

@MK-42 I tried a hack in Deere and another one in Tango.
Test skins are attached to lp1758660 "GUI lag with hidden waveforms in Tango & Deere, using integrated Intel graphics". Please test if the GUI is still lagging with those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants