[chuck-users] question about memory optimization

Spencer Salazar spencer at ccrma.stanford.edu
Thu Jun 7 19:34:40 EDT 2012


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] <crwicks at yahoo.com> wrote:

> That should read "question about CPU optimization" :)
>
>   ------------------------------
> *From:* [chriswicks] <crwicks at yahoo.com>
> *To:* ChucK Mailing List <chuck-users at lists.cs.princeton.edu>
> *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 at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
>
>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20120607/bc40e52d/attachment.html>


More information about the chuck-users mailing list