-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Optimization of VST3 shell plug-ins instantiation #530
Conversation
modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp
Outdated
Show resolved
Hide resolved
PClassInfo info; | ||
factory->getClassInfo(i, &info); | ||
|
||
if (std::strcmp(info.category, kVstAudioEffectClass) != 0) |
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.
I vaguely recall that many audio plugins don't support this method... I suggest testing with a variety of open-source plugs to be sure.
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.
Have a look at DescriptionFactory
to get a better sense of it.
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.
I picked this piece of code from DescriptionFactory. Basically this findName() method I added is the same as DescriptionFactory::findDescriptionsAndPerform() but I removed anything that is not needed. So the criteria are the same as before except we don't instantiate and destroy the component.
What I want to check in this loop is:
- the name of the component (does it match the the provided one nested in the passed description)
- is it an audio processor (we ignore any user interface component)
…ng prefix) Instantiating a VST3 shell plug-in can be overkill. For example, if using Waves complete suite of plug-ins (more than 400 plug-ins), the instantiation of the first enumerated plug-in (e.g. Waves API-2500) is almost instant, while the instantiation of the bottom listed plug-ins (e.g. Waves Q10) can take more than a minute. This code update avoids creating an instance of each component handled by a vst3 factory when opening a VST3 module, and instead just checks if the name of the provided description can be found in the enumerated classes of a vst3 factory. It allows a huge speed-up of plug-in instantiation for big VST3 shells such as Waves.
changed findName() into findMatch() and added component uid check in addition to name
Thank you. Added in 9c50bbd. |
Instantiating a VST3 shell plug-in can be overkill. For example, if using Waves complete suite of plug-ins (more than 400 plug-ins), the instantiation of the first enumerated plug-in (e.g. Waves API-2500) is almost instant, while the instantiation of the bottom listed plug-ins (e.g. Waves Q10) can take more than a minute.
This code update avoids creating an instance of each component handled by a vst3 factory when opening a VST3 module, and instead just checks if the name of the provided description can be found in the enumerated classes of a vst3 factory. It allows a huge speed-up of plug-in instantiation for big VST3 shells such as Waves.