Hey Chris,<div><br></div><div>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). </div>
<div><br></div><div>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? </div>
<div><br></div><div>spencer</div><div><br><br><div class="gmail_quote">On Tue, Jun 5, 2012 at 9:07 AM, [chriswicks] <span dir="ltr"><<a href="mailto:crwicks@yahoo.com" target="_blank">crwicks@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif"><div><span>That should read "question about CPU optimization" :)</span></div>
<div><br></div>  <div style="font-family:arial,helvetica,sans-serif;font-size:10pt"> <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div dir="ltr"> <font face="Arial"> <hr size="1">  <b><span style="font-weight:bold">From:</span></b> [chriswicks] <<a href="mailto:crwicks@yahoo.com" target="_blank">crwicks@yahoo.com</a>><br>
 <b><span style="font-weight:bold">To:</span></b> ChucK Mailing List <<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>> <br> <b><span style="font-weight:bold">Sent:</span></b> Tuesday, June 5, 2012 9:05 AM<br>
 <b><span style="font-weight:bold">Subject:</span></b> [chuck-users] question about memory optimization<br> </font> </div><div><div class="h5"> <br>
<div><div><div style="font-size:10pt;font-family:arial,helvetica,sans-serif"><div>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.<br>
</div><div><br></div><div>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.</div><div><br></div><div>Thanks for any insight!</div><div><br></div><div>-chris wicks<br></div></div>
</div></div><br></div></div>_______________________________________________<br>chuck-users mailing list<br><a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br><a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br><br> </div> </div>  </div></div><br>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br></blockquote></div><br></div>