AScustomWorks / AS

VCV Rack Modules
Other
114 stars 16 forks source link

High CPU usage of the Stereo VU meter #49

Open Petervos2018 opened 4 years ago

Petervos2018 commented 4 years ago

Hi Freddy, love your modules, but... there is always a but... can you tell me why the CPU usage of the stereo VU meter is so high ?

AS High CPU - 15102019

(I know when I connect something to the in, it goes down a little, but still it's very high). Even Plateau is using less and it's a CPU intensive module? The mono ones are OK.

Greetings Peter.

AScustomWorks commented 4 years ago

Hi Peter, thanks! Ok, this one is weird, I'm aware that I need to update the code to use the latest implementation available on VCV rack code for VU metering(it is more optimized than the original version), just hadn't got the time to do it yet. I will update it sometime, that's for sure.

But, something else may be going on there, see my screenshot of the same modules:

s-vu

Petervos2018 commented 4 years ago

Hi Freddy, you could be, and probably are, right. I'm on W7 Rack 1.1.5 what's your OS in the screenshot ? EDIT : and what are the mono ones doing on your system ? BTW I did not expect you to answer at all, let alone the same day. Thanks for replying. Greetings Peter.

AScustomWorks commented 4 years ago

Well, I answer fast, not so with fixing code :D Rack 1.1.5, Os X Mojave on a 2014 iMac 5K, not exactly the fastest around but pretty good even this days. The mono modules give half the reading of the stereo ones, pretty much the same reading as on your screenshot, that's the weird thing, if anything, the stereo modules should be using twice the cpu compared to the mono modules.

Petervos2018 commented 4 years ago

Well, thanks again Speedy Freddy, I don't really know what to do with this information, except that I will not use the Stereo VU meters on MY system, I just use 2 mono ones in stead. And I love the CPU usage of Plateau on YOUR system ;) Thanks again, I think there is nothing more to do here, you can close this if you want. Greetings Peter.

mocmichal commented 4 years ago

On Win 8.1 Pro: github_vcv_stereoMeter_win8

Petervos2018 commented 4 years ago

@mocmichal , thanks for this, so I'm not the only one having this issue, there is definitely something going on here...hmmmm. Maybe it's the CPU meter ? hihi

AScustomWorks commented 4 years ago

Mmm, I guess it's something about how win machines process the code from the stereo module. I'll take look at updating the code to the latest version asap ;)

mocmichal commented 4 years ago

@Petervos2018 now it seems to me (from % in Task Manager) the % numbers in VCV are not correct.

Petervos2018 commented 4 years ago

Hi @mocmichal

@Petervos2018 now it seems to me (from % in Task Manager) the % numbers in VCV are not correct.

Andrew changed the CPU meter in 1.1.4 :

Reimplement CPU meter to measure thread runtime, not real time.

The Windows Task manager and VCV CPU meter are not working the same way. AFAIK.

As long as the CPU numbers in VCV are relative to one another I think we have something we can measure against.

Before the change in 1.1.4 I could see on the audio8 module how much CPU was left, and when it got too low I could add another Thread. But sadly this is changed and now I can see that the audio8 module is also using CPU and that's all.

@AScustomWorks maybe you can do something about it, maybe not, take your time, do it right. Ooooh where did I put my SOS Band album......

Greetings Peter.

JerrySievert commented 4 years ago

one thing that could speed it up quite a bit would be to use a single custom widget for drawing instead of 15 widgets. I haven't looked at your dsp::vumeter code, but did note that you're spending a lot of time drawing, like 14x too much time.

AScustomWorks commented 4 years ago

Hi Jerry, you are correct. I'll take a look and see what happens when I get to update the vumeter code to the latest version ;)