I have a plugin with a lot of parameters (72,000 approximately). This works fine in VST format but I’ve come up against some huge overheads when creating the plugin when hosting it as an AU.
I’ve been going through looking at ways to optimise the parameter systems both on our hosting side, the plugin side and (most importantly) the AU wrapper hosting side as this is by far the biggest bottleneck.
The main issue is that during load,
setCurrentProgramStateInformation is called which results in a call to
sendAllParametersChangedEvents (actually this is called several times during initialisation and also when we change presets from within the plugin).
sendAllParametersChangedEvents does is:
• Create and dispatch 70,000 parameter change messages
• For each message the
eventCallback is called which then
• Iterates all the parameters to find a
• Which then iterates all the listeners
This is taking several minutes for our plugin but I’ve seen similar problems with plugins with far fewer parameters.
So I have two main questions:
- Is it really necessary to send a parameter change message like this during initialisation? From what I can tell, other formats don’t do this when the state is loaded?
- If this is necessary, is dissipating events like this the way to go? Would it not be better to simply iterate all the parameters, get their current value and call