On Sun, Apr 26, 2009 at 1:33 PM, Andreas Pflug <[email protected]> wrote: > Using the outline skin on Debian 5.0, I see mixxx consuming 13 % CPU, and > xorg 32% even when there's no visual change. > > Digging a little on the performance issues mentioned in the wiki, I found > that preventing ControlObject from changing unchanged values does the trick, > see attached trivial patch against trunk. It reduces xorg CPU usage to a > minimum when there's no display update. > > As soon as I play, the cpu usage rises again (mostly in xorg, caused by > wVuMeter updates), which I reduced drastically by using repaint() instead of > update() in WWidget::setValue(). > > Regards, > > Andreas >-devel
Hi Andreas, Thanks for the patch. I like the ControlObject patch, since one branch is a lot less costly than all the crazy mutex locking that goes on after that. I'm not so sure about the repaint() vs. update() patch though. The Qt docs are pretty clear about the usage of repaint(): "We suggest only using repaint() if you need an immediate repaint, for example during animation. In almost all circumstances update() is better, as it permits Qt to optimize for speed and minimize flicker." [1] The VU meter is basically an animation, so maybe this is a good case to use repaint(). However in that case, I think the update() call should be placed in a new WVuMeter::setValue() function that overrides the WWidget one. I'm worried that we're going to cause flickering and perhaps performance decreases on other operating systems if we use repaint() for all widgets. Does this make sense? (If it does, please make the changes and send us an updated patch, and we'd be happy to commit it. If it doesn't, let's discuss it...) Thanks, Albert [1] http://doc.trolltech.com/4.5/qwidget.html#repaint ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Mixxx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mixxx-devel
