diff --git a/CHANGELOG.md b/CHANGELOG.md index 7979d218..8917c9f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ Versioning](https://semver.org/spec/v2.0.0.html). TODO: Mention CLAP. Because, you know, kinda important new feature. +# Changed + +- Slightly optimized the use of serialization buffers to reduce memory usage for + VST3 audio threads and to potentially speed up parameter information queries + for parameters with lots of text. + ### Fixed - Fixed a minor memory leak in the Wine->X11 drag-and-drop implementation when diff --git a/src/common/communication/clap.h b/src/common/communication/clap.h index 053bde60..589deae3 100644 --- a/src/common/communication/clap.h +++ b/src/common/communication/clap.h @@ -343,7 +343,7 @@ class ClapSockets final : public Sockets { const T& object, std::optional> logging) { typename T::Response response_object; - thread_local SerializationBuffer<256> audio_thread_buffer{}; + thread_local SerializationBuffer<2048> audio_thread_buffer{}; return audio_thread_sockets_.at(object.owner_instance_id) .callback_.receive_into(object, response_object, logging, diff --git a/src/common/communication/common.h b/src/common/communication/common.h index f0665684..ff39ab8f 100644 --- a/src/common/communication/common.h +++ b/src/common/communication/common.h @@ -1110,6 +1110,8 @@ class TypedMessageHandler : public AdHocSocketHandler { // every time, but on the audio processor side we store the // actual variant within an object and we then use some hackery // to always keep the large process data object in memory. + // NOTE: Unlike the VST2 version, this persistent buffer is only + // used for audio thread messages thread_local SerializationBuffer<256> persistent_buffer{}; thread_local Request persistent_object; diff --git a/src/common/communication/vst3.h b/src/common/communication/vst3.h index bc4815b1..abaa09ab 100644 --- a/src/common/communication/vst3.h +++ b/src/common/communication/vst3.h @@ -263,7 +263,7 @@ class Vst3Sockets final : public Sockets { typename T::Response& response_object, size_t instance_id, std::optional> logging) { - thread_local SerializationBuffer<256> audio_processor_buffer{}; + thread_local SerializationBuffer<2048> audio_processor_buffer{}; return audio_processor_sockets_.at(instance_id) .receive_into(object, response_object, logging,