I’ve written a VST with JUCE that hosts another VST (like an effect rack).
The hosted VST UI is opened in a sub window owned by my pluginEditor.
However, on Windows, when I open UI-heavy VSTs (such as Serum on some presets), the UI lags a lot. Borderline unresponsive. Sound is not affected though.
So, for instance, opening Serum directly into Maschine works fine, even on heavy presets.
Opening Serum inside my VST “wrapper” makes its UI lag on heavy presets.
Same code in Maschine on osx, no problem.
Looking at the profiler in VS2017, it seems the “idle” calls that are sent to Serum on a Timer by the VST wrapper take all the resources. So obviously, Serum is drawing stuff that is CPU intensive. Commenting the idle calls from the wrapper relieve the CPU, but then of course the UI is not updated.
Is there an optimization to do for an hosted VST to run as smooth in another VST as when directly instantiated by the DAW on Windows? Something in the linker? Or related to OpenGL?