Csound Csound-dev Csound-tekno Search About

[Cs-dev] Possible Optimization

Date2006-10-28 09:37
From"Steven Yi"
Subject[Cs-dev] Possible Optimization
AttachmentsNone  

Date2006-10-28 21:41
Frommatt ingalls
SubjectRe: [Cs-dev] Possible Optimization
i assume you are talking about the commandline
and i would say fine, but let API hosts do their own buffering.

On Oct 28, 2006, at 1:37 AM, Steven Yi wrote:

> Hi All,
>
> I had a thought this morning for a possible optimization.  It's an
> idea that I first came across in the Java world, which is to use a
> threaded logger to do all messages.  The reason for this is that IO is
> generally expensive (or at least can be if writing out to console), so
> instead of directly writing out messages get posted to the logger
> which is running in it's own thread, so that in Csound, it can post
> the message and then get back to doing it's audio processing.
>
> I noticed with the new parser which has a *lot* of messages currently
> that it can take a while to get to the point where csound actually
> runs, but if I pipe the output to disk instead of console, it's really
> take only a very small fraction of that time.  I think if it was
> threaded, it might get the same advantage in time.
>
> Any thoughts?
> steven
>
> ---------------------------------------------------------------------- 
> ---
> Using Tomcat but need to do more? Need to support web services,  
> security?
> Get stuff done quickly with pre-integrated technology to make your  
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> Geronimo
> http://sel.as-us.falkag.net/sel? 
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-10-29 00:12
From"Steven Yi"
SubjectRe: [Cs-dev] Possible Optimization
AttachmentsNone  

Date2006-10-29 00:45
From"Steven Yi"
SubjectRe: [Cs-dev] Possible Optimization
AttachmentsNone  

Date2006-10-29 00:54
Frommatt ingalls
SubjectRe: [Cs-dev] Possible Optimization
AttachmentsNone  None  

On Oct 28, 2006, at 4:12 PM, Steven Yi wrote:

Do any hosts currently implement setting their own

message callbacks to work in an asynchronous manner?



yes - i have a circular buffer the csoundMessage callback writes to, 
and then a lower priority thread handles printing the buffer.


Date2006-10-29 10:44
From"Steven Yi"
SubjectRe: [Cs-dev] Possible Optimization
AttachmentsNone  

Date2006-10-29 19:31
Frommatt ingalls
SubjectRe: [Cs-dev] Possible Optimization
i probably don't really understand, but
i would assume the asynchronous handling be in the
default message routine, which would then no be used
if a host app registers a message callback?
[ so no need for a commandline flag ]

On Oct 29, 2006, at 2:44 AM, Steven Yi wrote:

> Hi Matt,
>
> Thanks for the reply!  I'm beginning to think that it's pretty
> important to have asynchronous handling for the Message callback,
> especially when rendering in realtime.  I think I'll experiment
> sometime with the commandline to see if implementing a threaded system
> there will help out for blue and also in realtime CSD's.  If it does
> indeed improve performance, would it be an issue to you or ayone else
> here if it was put into the core and disabled by default but
> enable-able (I've just coined a new word, I know :P ) with a flag?  It
> seems like it would be tedious to implement for API users in non-C/C++
> languages.
>
> BTW: Just as an experiment in Java, I found that the way to implement
> a MessageCallback is to use the CsoundCallbackWrapper as in below:
>
>         Csound csound = new Csound();
>         CsoundCallbackWrapper cw = new CsoundCallbackWrapper(csound) {
>             public void MessageCallback(int attr, String msg) {
>                 System.out.println(">>" + msg);
>             }
>         };
>         cw.SetMessageCallback();
>
>         csound.Compile("/work/blue/sineTest.csd", "-Wdo", "dac");
>         csound.Perform();
>
> Learning something every day! =)
>
> steven
>
>
>
>
> On 10/29/06, matt ingalls  wrote:
>>
>>
>> On Oct 28, 2006, at 4:12 PM, Steven Yi wrote:
>>
>>
>> Do any hosts currently implement setting their own
>>
>> message callbacks to work in an asynchronous manner?
>>
>> yes - i have a circular buffer the csoundMessage callback writes to,
>> and then a lower priority thread handles printing the buffer.
>>
>>
>> --------------------------------------------------------------------- 
>> ----
>> Using Tomcat but need to do more? Need to support web services,  
>> security?
>> Get stuff done quickly with pre-integrated technology to make your  
>> job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
>> Geronimo
>> http://sel.as-us.falkag.net/sel? 
>> cmd=lnk&kid=120709&bid=263057&dat=121642
>>
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>
> ---------------------------------------------------------------------- 
> ---
> Using Tomcat but need to do more? Need to support web services,  
> security?
> Get stuff done quickly with pre-integrated technology to make your  
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> Geronimo
> http://sel.as-us.falkag.net/sel? 
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-10-29 23:08
From"Steven Yi"
SubjectRe: [Cs-dev] Possible Optimization
AttachmentsNone