Cache ControlObject lookups in MidiController::processInputMapping
Bug #1184581 reported by
Daniel Schürmann
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mixxx |
Confirmed
|
Low
|
Unassigned |
Bug Description
// If no control is bound to this MIDI message, return
if (!m_preset.
return;
}
QPair<
... snip
ControlObject* p = mc.getControlOb
summary: |
- Control lookups in MidiController + Cache ControlObject lookups in MidiController::processInputMapping |
To post a comment you must log in.
We should do a complete refactor the CO hashtables:
I have some made some measurements on a Ubuntu 32 bit system and here are the results:
(The absolute values are only for reference, they are rather un-precise and varies from run to run, but the tendency and magnitude is allays the same.)
ControlObject: :get(ConfigKey( )); // 2065 ns on a hashtable filled with all controls tThread( ConfigKey( ))->get( ); // 1930ns on a private hashtable filled with 6 controls
getControlObjec
pCOT->get(); // 695ns and will be much faster on a 64 bit system because double is atomic there
Conclusion:
* Size of QHash dos not put significant time on the get call.
* Saving a local pCOT speeds up get() by 3 @32bit
https:/ /bugs.launchpad .net/mixxx/ +bug/1166016 depends on this as well.