> What I want to know is we already have the cache memory stream > which we read from and there is multiple copying of data as > TMemoryStream->FDocBuf->ICS> internal buffer->Winsock.
Most static files are currently served using TFileStream which is unbuffered with no cache, so reading large amounts into a larger FDocBuf is more efficient than at present. Obviously specific THttpSrv implementations may be loading the stream in different ways, from caches or whatever, and messing with buffer sizes, but many people (including my own implementations) just use the server defaults, which are not very efficient. You can not read a stream straight into TIcsBufferHandler used by PutDataInSendBuffer in WSocket, it only accepts pointers. There are multiple buffer 'pages' 1,460 bytes in size, not necessarily in contiguous memory, so they have to filled one at a time. Each call to PutDataInSendBuffer does a lock of all the buffers, so a larger FDocBuf means before locks. So the changes I propose to OverbyteIcsHttpSrv will essentially be the same as the FTP server, including using TBufferedFileStream, a larger FDocBuf if the stream size justifies it, and increasing the socket TCP buffer likewise, no point in allocating 32K buffers for a 2K GIF image. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be