Use unordered maps for VST3 plugin instances

The better algorithmic time complexity should help when using many (say,
hundreds) of instances of a single VST3 plugin.
This commit is contained in:
Robbert van der Helm
2021-06-11 14:48:28 +02:00
parent dec19dc12a
commit aaf3e7438c
6 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -529,7 +529,7 @@ class Vst3PluginProxyImpl : public Vst3PluginProxy {
/**
* Memoizes `IEditController::getParameterInfo()`.
*/
std::map<int32, Steinberg::Vst::ParameterInfo> parameter_info;
std::unordered_map<int32, Steinberg::Vst::ParameterInfo> parameter_info;
};
/**
+1 -1
View File
@@ -204,7 +204,7 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
* `register_plugin_proxy()` in the constractor, and an instance is then
* removed through a call to `unregister_plugin_proxy()` in the destructor.
*/
std::map<size_t, std::reference_wrapper<Vst3PluginProxyImpl>>
std::unordered_map<size_t, std::reference_wrapper<Vst3PluginProxyImpl>>
plugin_proxies;
private: