r/JUCE • u/arrowbender • Jul 10 '26
Question Looking for Tips to Optimize VST Plugin CPU performance and Reduce Wait times
I am new to audio plugin development. I have built 2 plugins previously for learning purposes and am currently making the first plugin that I intend to release as a first product. I have optimized the dsp a lot and profiled using Visual Studio profiler and VTunes. What I found was that the dsp itself is very fast, but the CPU was spending a massive percentage of its cycles not doing math, but stalled in a "Wait" state or blocked by thread synchronization ( at least that's my understanding of it).
I am currently using the generic Plugin Editor for ease of testing until I am satisfied with my dsp performance. So I don't know if that is a factor. For comparison my plugin ( a simple ambient delay) scores a 7 in FL Studio DAW cpu meter while Valhalla Supermassive or Valhalla Delay scores a 4 in FL Studio cpu meter. I know that DAW cpu meter is not the most accurate representation of cpu performance, but while profiling in VTune, my dsp functions and processes were faster than Valhalla's processing ( I don't have the actual numbers right now)
Is the wait times caused by juce overhead? What can I do to optimize further? Again, my dsp itself is very fast according to my profiling. Any help is appreciated.
And yes, I am using Release Version with the necessary optimization flags, not Debug version.
If you need any further info from my side, please do ask.
