[ANSWERED] What is the Performance Impact of Using Many OSC Multi Listener Actors?
-
Hello,
I am building a user actor which I expect to have multiple instances of - it converts OSC data into usable info. Is there a performance impact of having the OSC listeners inside each actor (meaning there would be multiple listeners listening to the same thing) or should I be doing something with gobal values?
Thanks
Richard[EDIT: changed your subject line to help others better understand what this topic is about.]
-
@shadlx said:
Is there a performance impact of having the OSC listeners inside each actor (meaning there would be multiple listeners listening to the same thing) or should I be doing something with gobal values?
There is very little impact having multiple instances of the actors unless you get into the thousands upon thousands of them.
TL;DR Geeky Details
Behind the scenes, when an OSC message for a specified channel is received, all actors who "want" that message are notified of the new message.
In the case of the OSC Listener, it says "I want OSC messages only on channel xxx" where xxx is value entered into the 'channel' input. Only messages on channel xxx are actually forwarded to the actor.
In the case of the OSC Multi Listener, all OSC messages on every channel are sent to the actor. What messages are actually passed on to the output depends on the setting of the 'base chan' and 'num chan' inputs: if the channel number of the incoming OSC message is within the range base chan to base chan+(num chan-1) inclusive, then the value is passed on to the output.
So the Multi Transmit is a bit less efficient if you have billions of OSC messages that are not intended for that actor.
But in the end, we're talking about microseconds of cost.
Best Wishes,
Mark -
@mark said:
In the case of the OSC Multi Listener, all OSC messages on every channel are sent to the actor
Well that is good to know.
Best Wishes
Russell