DISTRHO / Cardinal

Virtual modular synthesizer plugin
https://cardinal.kx.studio/
GNU General Public License v3.0
2.28k stars 155 forks source link

Abnormally Hight Cpu usage on "idle" modules. ( Reaper, standalone(native), Windows 7/10 ) #490

Closed Ongomato closed 1 year ago

Ongomato commented 1 year ago

Some modules exhibit significant increase in CPU usage after not receiving any input for a short period of time(2-4 seconds). Especially problematic on heavy modules. This happens in Reaper on all plug-in formats, and in a standalone native build, both on windows 7 and 10. Doesn't happen in other DAWs ( FL studio, Ableton, Bitwig )

2023-02-08-15-55-49

dromer commented 1 year ago

We've seen a couple odd issues with Reaper related to transport. Do you see a difference in cpu usage when you have transport idle VS running?

Ongomato commented 1 year ago

Just checked, transport doesn't seem to affect this in any way. I get exactly the same CPU usage as in standalone version.

falkTX commented 1 year ago

This is likely related to denormals. I hate the idea of messing up with global state from within the plugin, but for this I dont think we have a choice.

@Ongomato do you know how to get the latest github action builds? I can do a test build fix if you are willing to give it a try.

Ongomato commented 1 year ago

Sure, i can test if it works.

falkTX commented 1 year ago

ok pushed a test build in https://github.com/DISTRHO/Cardinal/actions/runs/4127770798 should be ready in ~1h from now.

Ongomato commented 1 year ago

Tried the test build just now and it looks like the fix worked, the issue is gone. Thank you.

falkTX commented 1 year ago

Thanks for checking!

Will add this as part of the 23.02 release

falkTX commented 1 year ago

This was an old bug we forgot to close, doing that now