CPU Performance

Hello everyone,

in the last few weeks I had more and more cpu performance issues running TC on an 2020 MacbookPro with 16GB RAM. And I didn`t load the laptop with more complex functions than before. What can I do to improve the cpu performance? Maybe less samples inside the dirt folder? What else can I improve?

2 Likes

there's a great "lazy" sample loading feature you can use but now I'm not sure how much CPU it will buy you.

3 Likes

Thank you for this hint, @kit-christopher . I will try it out.

Hi, I do a lot of live coding from a very low spec laptop so I have a lot of little things that I try. The lazy sample loading is one. This may be obvious but look for tidal code that is sending many events to super collider... Things like plyWith and stut can add a lot of sample triggers - usually fine but when you stut a plyWith for example- That kind of thing adds up exponentially.
I use neovim and sclang from terminal, seems to help a little bit. I also reduce my sample rate to 44000 16 bit in qjacktl and turn off real time scheduling. I'm not as concerned about latency with this particular computer. Also, midi out to hardware is much less taxing on the CPU, honestly even routing internally through midi to things other than supercollider seem to do a little better.
Oh, and look for other processes running in the background. Web browsers are monsters.... Aaand I can do all these things and still have struggles.

I know all of these don't apply specifically to your system but maybe it will give you some ideas? Maybe you have tried similar stuff already?

9 Likes

Never thought about changing the editor. Thank you for this bunch of hints. And yes, you are riight. PlayWith and stut, which I use too sometimes , are greedy.

1 Like

I use the linux routine top to see what's consuming a lot of resources. It's not perfect -- for instance, Firefox running Facebook in a tab will be reported by top as "isolated Web content", which isn't very helpful for figuring out what app to close. There are surely smarter ways to profile.

I've imagined turning off wifi so that my computer can't be doing anything online in the background, but so far haven't actually tried it, let alone tried to measure the effect of doing so.

In general measurement is key to improving performance; otherwise you might be wasting your time on things that theoretically seem like they might be issues but aren't.

1 Like

This is Linux specific but maybe there a counterpart available for OSX: I am using cpupower to set the CPUs into performance mode (highest possible frequency).

Also primarily for Linux there is a script to check the real time audio setup; maybe there is also some alternative for OSX available.

2 Likes

you may also be able to tune down the load a little by adjusting the minimal sustain below which superdirt will drop the sound event. There is quite a bit of calculation that precedes this, but it may still help a bit.

~dirt.minSustain; // by default, this is  8 / server.sampleRate
~dirt.minSustain = 0.001;

This might completely silence some patterns. But one could easily change the implementation to make it more random, so that you'd just get some corrosion instead of silence.

5 Likes