Don't use QStylePainter in WSpinny. lp:1530720#1994
Conversation
Using a QStylePainter on *any* QOpenGLWidget seems to introduce up to a 10x rendering slowdown for *all* QOpenGLWidgets. We should probably figure out how to style WSpinny without QSS to realize this savings.
|
The mac Travis failure is unrelated. |
|
These are the two places I found that style WSpinny: LateNight: WSpinny {/*
This produces artifacts in spinny bg
background-color: rgba(1, 1, 1, 10);
This makes no difference, the spinny loads some default grey bg
background: none;*/
}Tango: #SpinnyMini {
background-color: transparent;
}I'm not sure that transparency is even an option with QGLWidget. @ronso0, do you know why Tango sets this and whether it actually works? |
It doesn't work, it's probably just a leftover from testing. If I comment out the spinny background and the spinny mask, it looks like this after skin reload: |
|
This is a nice CPU usage win for 2.2 on macOS -- with 1 deck playing (4 decks visible), PreviewButtonDelegate disabled, CPU usage with one deck playing drops from ~75% to ~45%. |
… Launchpad Bug #1812763 After upgrading to Qt 5.12, Mixxx idle CPU usage is high (99%) on macOS. Profiling shows LibraryPreviewDelegate::paintItem as one of the hottest functions. It appears to be related to calling QPushButton::setGeometry for each row of the library. My workaround relies on the fact that we only need the QPushButton size to be correct, not its position. On macOS 10.13.6, CPU usage drops from 99% to 50% with this change (and with mixxxdj#1994, idle usage drops to 15%).
|
Thank you LGTM |
… Launchpad Bug #1812763 After upgrading to Qt 5.12, Mixxx idle CPU usage is high (99%) on macOS. Profiling shows LibraryPreviewDelegate::paintItem as one of the hottest functions. It appears to be related to calling QPushButton::setGeometry for each row of the library. My workaround relies on the fact that we only need the QPushButton size to be correct, not its position. On macOS 10.13.6, CPU usage drops from 99% to 50% with this change (and with mixxxdj#1994, idle usage drops to 15%).


Cherry-picked from #1974, since I forgot about https://bugs.launchpad.net/bugs/1530720.
When I originally filed the bug, it only printed
QMacCGContext:: Unsupported painter devtype type 1once, now it is quite spammy. I haven't tested whether the performance improvement in #1974 also applies to QGLWidget.Using a QStylePainter on any QOpenGLWidget seems to introduce up to
a 10x rendering slowdown for all QOpenGLWidgets. We should probably
figure out how to style WSpinny without QSS to realize this savings.