[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] OSCFunc oneShot is breakable because of careless FunctionList implementation



On Dec 9, 2013 6:00 PM, "Scott Wilson" <i@xxxxxxxxxxxxxx> wrote:
> > Let's get moving on SC4, and clean up this kind of nonsense?
>
> I somehow suspect that won't eliminate these sorts of cases, but I like the optimism. :-)

My hope is rather that a more streamlined, cleaner class library with less cruft and better factoring would make it easier to see that you're about to make a mistake (like, iterating over a collection that could be modified in the process).

Anyway, performance bothers me in this case. A synth with SendReply, running with fast triggers, can produce a lot of OSC traffic. (Similarly, /accxyz messages from TouchOSC.) If multiple OSCFuncs are registered for that path, you'll be copying the FunctionList array dozens of times a second. But it's not safe otherwise... and the dispatchers don't know in advance whether or not it'll be safe to be unsafe.

I don't know the answer...

hjh