speed differences between mxj net.udp* and udpsend/receive


    Jun 10 2008 | 6:53 pm
    Hi all you network savvy Max 5 users,
    I just wanted to see if this was expected before I go a little nuts trying to work around some latency issues. Within my patch I'm noticing an almost order of magnitude difference in the latency between sending a UDP packet via the mxj net.udp objects and the udpsend/receive objects (70 ms to process the data and send vs.7 ms). The problem is I can't use the latter since I am sending to other machines that don't particularly care for the OSC formatting, plus I need the flexibility of sending TCP or multicast messages, too (hence my affinity for the mxj net.* objects). Is the difference I am seeing somewhat expected for java-based vs. c-based network objects? Is it time for me to start learning c? :)
    Thanks,
    David

    • Jun 10 2008 | 7:06 pm
      Use netsend/netreceive external (see maxobjects.com).
      Best wishes,
      ico
      > -----Original Message-----
      > From: maxmsp-bounces@cycling74.com [mailto:maxmsp-bounces@cycling74.com]
      > On Behalf Of David Beaudry
      > Sent: Tuesday, June 10, 2008 2:53 PM
      > Subject: [maxmsp] speed differences between mxj net.udp* and
      > udpsend/receive
      >
      >
      > Hi all you network savvy Max 5 users,
      >
      > I just wanted to see if this was expected before I go a little nuts trying
      > to work around some latency issues. Within my patch I'm noticing an almost
      > order of magnitude difference in the latency between sending a UDP packet
      > via the mxj net.udp objects and the udpsend/receive objects (70 ms to
      > process the data and send vs.7 ms). The problem is I can't use the latter
      > since I am sending to other machines that don't particularly care for the
      > OSC formatting, plus I need the flexibility of sending TCP or multicast
      > messages, too (hence my affinity for the mxj net.* objects). Is the
      > difference I am seeing somewhat expected for java-based vs. c-based
      > network objects? Is it time for me to start learning c? :)
      >
      > Thanks,
      > David
      >
      >
      >
    • Jun 10 2008 | 7:28 pm
      Those have actually been a bit flakey for me, especially in Max 5. In fact I couldn't get netsend (for UDP) to work at all, even in the help file. after sending a connect message I would still get "netsend: not connected".
      David
    • Jun 10 2008 | 7:37 pm
      actually testing the netsend/receive object just produces errors with both UDP and TCP. errors as not recognizing "localhost", changing the port on netreceive to 4545 and getting "netreceive: netreceive:select() failed with -1", connecting to my IP on port 6000 giving the error giving the error "netsend: connecting stream socket: Connection refused (61)" etc. etc. I only mention these in case Olaf is still supporting them, not to bash them :)
      Thanks, tho, for the advice.
      David
    • Jun 10 2008 | 7:53 pm
      Could be the API change broke them. Particularly if Olaf utilizes Flext
      layer (which I think he does) that relies upon the low-level
      Sorry!
      Best wishes,
      ico
      > -----Original Message-----
      > From: maxmsp-bounces@cycling74.com [mailto:maxmsp-bounces@cycling74.com]
      > On Behalf Of David Beaudry
      > Sent: Tuesday, June 10, 2008 3:38 PM
      > Subject: [maxmsp] Re: RE: speed differences between mxj net.udp*
      > andudpsend/receive
      >
      >
      > actually testing the netsend/receive object just produces errors with both
      > UDP and TCP. errors as not recognizing "localhost", changing the port on
      > netreceive to 4545 and getting "netreceive: netreceive:select() failed
      > with -1", connecting to my IP on port 6000 giving the error giving the
      > error "netsend: connecting stream socket: Connection refused (61)" etc.
      > etc. I only mention these in case Olaf is still supporting them, not to
      > bash them :)
      >
      > Thanks, tho, for the advice.
      >
      > David
      >
      >
    • Jun 11 2008 | 4:16 pm
      Were there any more thoughts on expected speed differences between java network objects and c network objects in Max?
      Thanks,
      David