Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 May : Indy 9: Read speed goes in toilet with large packets
| Subject: | Indy 9: Read speed goes in toilet with large packets |
| Posted by: | "Rithban" (rithb..@yahoo.com) |
| Date: | Tue, 10 May 2005 13:48:28 |
I'm scratching my head here, working with large packet sizes on Indy 9.
This is a simple TCP/IP client and server using a simple protocol. It
sports an eight byte header that contains the total packet size in four
bytes.
I'm using Write(aString) to send the data and ReadString(aNumBytes) to
read the data.I put timing code immediately before and after the Write()
and ReadString().
I see that even when I crank the packets to 10MB in size, Write()
consistently clocks out to ~40MB/S. However, as the packet size
increases ReadString() quickly slows to a crawl. a 1MB packet
consistently clocks at ~2MB/S, and a 10MB packet consistently clocks at
~750kB/S.
Unacceptably slow.
Should I be using something different to send and received, or am I
overlooking something?