From: Ryan Pavlik Date: 2003-04-04T05:48:53+09:00 Subject: read/write slow, and TCPSocket and sys{read,write} OK, so I'm throwing things back and forth over the network. Marshalled objects, to be exact. The problem is, this is _slow_. And the problem is read/write, as far as I can tell. For instance, I can marshal and send 1000 objects, and receive 1000 replies, in a fraction of a second. However, if I send them one-by-one, it takes minutes! Same code on both ends for the test. What gets sent is a 4-byte network-order length, followed by the data. So, at the suggestion from #ruby-lang, I tried sysread/syswrite. Except TCPSocket doesn't seem to want to let me use those... I get an IOError about sysread on a buffered stream. (And no, I'm not using any buffered functions myself, like #read, #write, #print, etc... only 4 calls, 2 sysreads, 2 syswrites.) My main problem is the slowness. The sysread/syswrite bit was just a hopeful solution. Anyone have any ideas? Thanks. -- Ryan Pavlik "I've got a crude stabbing implement right here with your name all over it." - 8BT