Cubase Performance goes crazy!


#1

Greetings fellow Jucers!
as i have mentioned before i am very new to all this…

I have edited the JuceEqualizer:

to that: (in order to build a 10 band kind of crossover application)

but i do get almost 98 % performance and cpu load in cubase when the plugin is loading and then it drops to 68-75% while playback
any ideas what could be wrong?
Blessings!
Chris


#2

We don’t see your processing code, but I would bet your issue is there, as you are only processing one sample at a time instead of a chunk for each filter. And this would lead to lots of cache misses on top of the lack of vectorization.


#3

Have you profiled the code to see your bottlenecks?


#4

Is it a debug or release build you are running?


#5

it is a debug i think
C:\Users\Chris\Desktop\Bobby\Builds\VisualStudio2017\x64\Debug\VST\Bobby.dll

correct?

does the release build behaves better?


#6

no as i said i am very new to this …
can i do that inside visual studio?


#7

yes

also yes, because the optimiser is turned off in a debug build.

In VisualStudio there is a simple switch you change from Debug to Release, that turns the optimisation on.

Cheap optimisation (like I wrote in your other thread:

Close the loop between line 452-468 and start a new loop for the right block line 471-482.

Background:
when you access the audio buffer leftChannel[i] the fast cache will read a couple of samples ahead with little overhead. That way it will have the next sample already at hand.
But now your code goes to the right channel, so the fast cache realises, that it got the wrong samples, throws them away and reads the right block from the slow memory.
When it is done with the right channel, the fast cache has to be thrown away to get back to the left channel.
So a second for loop solves that issue.

Enter this as line 469:

} for (int i = 0; i < buffer.getNumSamples(); i++) {

HTH


#8

many thanks daniel !!!
you made me happy!!
Blessings!!!


H e l p w i t h IIR implementation ** from sample based to buffer?
#9

The performance level is now at 25% when the sequencer is stopped while when i press play it goes down to 10% ??
any ideas what that could be? could it be the releaseResources() ?
should i do something there?


#10

Like several people said:

USE A PROFILER!!

We’ve no idea what’s going on in your code, but a profiler will show you exactly what’s happening - that’s what they’re for!