wolf-plugins / wolf-spectrum

Real-time 2D spectrogram plugin (LV2, VST and Jack)
GNU General Public License v3.0
125 stars 4 forks source link

Spectrograph gets very slow after a while #51

Open unfa opened 3 years ago

unfa commented 3 years ago

Look at how slow Wolf Spectrum gets after 20 minute of non-stop use: https://youtu.be/C92wFP0CG7c?t=1739

Could this be some problem with non-freed image memory or something?

pdesaulniers commented 3 years ago

In the video, were you using the LV2 / VST2 build of the program?

Wolf Spectrum is probably slowing down the UI update loop because the rendering code is not very optimized. At least, it seems like Wolf Spectrum is slowing down Surge's UI. Also, the spectrogram appears to be scrolling slower when you are tweaking Surge's parameters.

unfa commented 3 years ago

Yes, I've used the LV2 plug-in via Carla.

pdesaulniers commented 3 years ago

@unfa I can reproduce the slowness (at least, to a certain extent):

1) Load Surge and Wolf Spectrum in Carla 2) Open both UIs 3) In Surge, set the UI zoom to 200% 4) In Surge, insert effect Conditioner > Sit Tight 5) In Surge, tweak the LFO rate slider at the bottom of the UI while playing some notes

This causes Wolf Spectrum to scroll very slowly. The performance improves as soon as I stop playing with the slider. I suppose Surge is slowing down the UI update loop.

Also, just hovering the sliders with the mouse appear to slow down Wolf Spectrum a little bit.

As a workaround for this kind of issues, you can use the standalone JACK version of Wolf Spectrum instead of the plugin version. That way, the spectrogram should scroll more smoothly.

But then, perhaps your CPU simply had trouble keeping up during the filming? If so, I would try to optimize Wolf Spectrum for lower CPU usage, to see if it helps...

pdesaulniers commented 3 years ago

CC @baconpaul, any thoughts? Do you think this might have something to do with https://github.com/surge-synthesizer/surge/issues/4347?

baconpaul commented 3 years ago

Maybe Also though: Which surge version are you running? If you are not running 1.9 there was a vstgui memory leak which could also cause this (where reference counts on offscreen caches are in play).

pdesaulniers commented 3 years ago

@baconpaul I was running the official 1.9 binary during my tests.

Anyway, I'll take another look at this issue before the next release of Wolf Spectrum.

baconpaul commented 3 years ago

right well that one has the leak fixed.

i'm really not sure what causes that ardour x usage in surge. We do know that the alpha of our next version (where we replatform to juce) doesn't show the same problem.