Hello Roman,
Le vendredi 20 août 2010 à 23:29 +0200, Roman Haefeli a écrit :
On Fri, 2010-08-20 at 16:36 +0200, Jack wrote:
Hello Mathieu,
I have already do that with [packOSC]/[unpackOSC] and [udpsend]/[udpreceive], it is slow too. I need to send 20000 lists of 3 floats (id, pos x, pos y) each frame (50 fps) from one process to other. Thanx. ++
It seems to me as you were creating a lot of overhead for tranmitting only 3 floats. First there is the OSC overhead per message, then each OSC message is sent over UDP, while adding some datagram overhead. By sending 20'000 or even 60'000 floats per message, you could drastically reduce the OSC and UDP protocol overhead. Don't know if this is the real reason for being so slow, but I'd try to reformat your messages. Also, this would probably mean using less computing power for creating all those messages and packets.
In fact, i have tried one more time with only [pd~] and [stdout] and it seems to be faster than [pd~] and [udpsend]/[udpreceive]. But Pd freeze if i send a lot of data to [pd~] :/ One remark : I am not sending 20000 or 60000 floats per message but 20000 messages of 3 floats every frame (near every 20 ms). The problem seems to be the transfert of the packets not the creation off the messages (they are created by [msd2D] with only one message). Thanx. ++
Jack
Roman