-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fixes several performance problems found with Valgrind #2579
Conversation
Did a quick test, and it looks good to me 👍. Nice optimization work! Minor nitpicking: https://github.com/LMMS/lmms/pull/2579/files#diff-b6cdb0811e7a10721f0bfb60ea98f525R180 lacks the spaces between parentheses and arguments, but I believe that particular style guideline isn't observed that strictly anymore. |
Correct. We're slowly moving away from it, so we try to do our best to match the style of the item we're modifying until we have time to clean it all up. 👍 |
@@ -314,8 +314,7 @@ class EXPORT Mixer : public QObject | |||
m_playHandleRemovalMutex.unlock(); | |||
} | |||
|
|||
static float peakValueLeft( sampleFrame * _ab, const f_cnt_t _frames ); | |||
static float peakValueRight( sampleFrame * _ab, const f_cnt_t _frames ); | |||
void getPeakValues( sampleFrame * _ab, const f_cnt_t _frames, float & peakLeft, float & peakRight ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function should be const.
Works well. Look into marking any |
Removes some repeated calls to Qt's font layouting by using QStaticText in FxLine and removing the overridden method ComboBox::sizeHint. Unifies Mixer::peakValueLeft and Mixer::peakValueRight into Mixer::getPeakValues so the array is only iterated once.
c6df110
to
f6317f1
Compare
Fixes several performance problems found with Valgrind
Hmm... Travis says this errored, but the green check is above... Even stranger, the build actually compiled, but says exit 1. Safe to ignore I think, but we'll keep our eye on it. Re-launched the Travis process just incase.
|
@tresf That's strange indeed. I have actually waited for all builds to succeed before merging this one. Is the attached image from the relaunched build? Only asking because my build was 3510.* and 3510.4 and 3510.5 both say they exited with 0. |
Removes some repeated calls to Qt's font layouting:
FxLine::drawFxLine
now uses aQStaticText
instance to render the channel names. The methoddrawFxLine
was turned into a member method so that theQStaticText
member can be accessed.ComboBox::sizeHint
.Unifies
Mixer::peakValueLeft
andMixer::peakValueRight
intoMixer::getPeakValues
so the array is only iterated once.