A wasted morning trying to reduce CPU load for my GUI
Hi everyone, I’ve had a bitch of a morning. I’ve been building a patch for the past few month which is nearing completion, unfortunately the CPU load of the GUI is inhibitive, especially as it will eventually run on some fairly old computers. The patch centers around four loopers, one of which is pictured below. The bright segment of the ring spins with the loop, the shorter the loop the faster the ring spins. With really short samples this send the CPU load on my (pretty fast) computer crazy, 100%+ load.
So what to do now? I’m starting to look at jit.gl.sketch but I can’t help noticing that it renders in 3D, will this incur an even greater load? What objects would you recommend? These loopers appear pretty big on screen, and for very short samples they can rotate very quickly. Would value any input at this stage. :(
So I guess what I’m looking for is the most efficient way to draw an arc in max…
By chance I have had a JSUI week too, and actually in my case I did find quite a good reduction in terms of cpu in relation to lcd. Anyway, in this case, instead of using drawing commands, could it be possible to export all possible states as images and alternate between them using pictslider?
I’d tried loading alternate images but not pictslider, I’ll have a go now. Thanks jvkr :)
So I’ve had a play with pictslider in this context, its still a pretty big hit when "scale knob" is selected. The circles fo fill up the screen and they need to scale dependent on screen size.
jit.gl.sketch may well be faster, even though it’s 3D, because it’ll be GPU-optimised (though how much this helps will depend on where you’re rendering to). I’d give it a go. You might also look at jit.mgraphics, although I suspect that wouldn’t lighten the CPU load. I don’t know for sure as I’ve not had time to get to know it yet.
Hi Jo, good to hear from you! jit.gl.sketch does appear to be much faster with much less of a CPU hit, I’ll keep knocking on that door I think!
You also might want to have a look at the jit.gl.lua object. It combines scripting with the openGL world.
I recently created a timeline GUI for the jit.path objects and it renders without any problem on high framerates.
You can even capture your results from within lua to a texture for further use.
from looking at it i would say switch to [lcd]
It was originally written for [lcd], thats been a major part of the problem, [lcd] gobbles up massive amounts of my CPU. Been running jit.gl.sketch at very rapid frame rates with a massive reduction in CPU, its dropped from 105% to 15%! :)
Forums > MaxMSP