[PD] udpsend performance issue

Martin Peach martin.peach at sympatico.ca
Mon May 9 04:54:59 CEST 2011

On 2011-05-08 13:48, Matteo Sisti Sette wrote:
> Hi,
> If I send a few hundreds packed OSC messages with [udpsend], it blocks
> for about 100-200 milliseconds or more (I see the message "udpsend
> blocked for xxx milliseconds" in the console, and I notice the effects).
> I know that this is a lot of messages and I can (and have to) optimize
> things by avoiding sending unnecessary data, but:
> I have replaced [udpsend] with a [netsend 1] (this is by no means a
> workaround, just a test to compare performance) and if I send the very
> same messages (which actually means sending much more bytes), netsend
> does _not_ block for such a long time. It doesn't print any such message
> (and netsend does print it if it blocks for a significant time) and I
> don't notice any delay. I have verified that it is actually sending the
> data.
> So I wonder, is there an intrinsic reason why udspend takes much more
> time than netsend to send a certainly smaller amount of data? Or is
> udpsend simply implemented in a less efficient way? Does anybody know
> where the bottleneck is and if there is a way to eliminate it?

[udpsend] uses almost the same code as [netsend] to send the data.
I guess the bottleneck is in the way you load the hundreds of messages 
into [udpsend]. Are you receiving one packet per message at the other end?


More information about the Pd-list mailing list