Angus Robertson - Magenta Systems Ltd wrote:
>> I've uploaded a tiny buffered file stream class as well
>> as a simple test program. It is amazing fast when small
>> chunks are read/written. Seeking is slower than TFileStream :(
> 
> I'll try in one of my applications, but it won't be until next week.
> 
> For the FTP server, I often have multiple PCs downloading the same
> files, in some cases 30 or 40 megs.  With the normal TFileStream,
> presumably Windows will be effectively buffering the file once, and each
> separate stream will be reading from common windows buffers, in the
> normal read chunks specified by the server.  I've never really
> understood whether this was efficient, or just simple.
> 
> So what are the implications of buffering the same file multiple times?
> Presumably just the extra memory for the buffer?

You save a lot of API calls. It depends on the ratio of block size and
buffer size. The SmtpCli reads files byte by byte hence it benefits from
a buffered stream enormously.

> 
> I have a couple of special files that are read thousands of times of
> day, both less than 1 meg that I could keep in a memory stream for
> efficiency.

I think that's the fasted way of caching.  

> 
> Angus
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to