Hey Chris,
The situation as you've described it doesn't seem like it would cause
excessive CPU usage on any modern personal computer, unless you are
processing loads of OSC messages (off the top of my head, more than a dozen
per millisecond).
In my experience CPU overload is most often caused by an audio graph that
is too large, i.e. too much stuff chucked directly or indirectly to dac.
Another issue is doing control-rate processing too fast, i.e. lots of loops
running 1::samp => now; or similarly short time durations. Is your project
doing anything along those lines?
spencer
On Tue, Jun 5, 2012 at 9:07 AM, [chriswicks]
That should read "question about CPU optimization" :)
------------------------------ *From:* [chriswicks]
*To:* ChucK Mailing List *Sent:* Tuesday, June 5, 2012 9:05 AM *Subject:* [chuck-users] question about memory optimization Hello all! I have a moderately-sized project that I'm working on right now...the basic gist is that it's several smaller ChucK programs containing infinite loops and OSC event "listeners" that trigger certain behaviors or events in the music all running concurrently (the main catcher/sender for the OSC values is being written in C++). All told, in its present state there are 26 shreds running in the VM.
This program takes up a LOT of CPU resources, and I was wondering if anybody had any tips on optimization, or if this is just a fact of life with a ChucK program of this nature. I know that the OSC stuff has only recently been implemented. I feel like I've been reasonably efficient with my code, but I'm seeing upwards of 80% CPU usage. It stays pretty stable, but this seems like a lot. In its current state, it's unplayable on my dual-core laptop, but my quad-core desktop can handle it OK.
Thanks for any insight!
-chris wicks
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users