Octavian Rasnita wrote at Sat, 27 Jul 2002 13:21:54 +0200: > I've put this question a few months ago, but with no answer. When using the read >function for > reading a file (for printing to the browser - for downloading) how big should be the >buffer size > read at once by the script? > > I've seen that if I put it as only 1 byte, the download is very slow. What happend >if I will > increase it too much? > > Should this buffer be related to the average download speed somehow? > > .... or I can put as buffer size, the size of the file?
The standard value is in general quite good enough. Talking about hard disks, it's the best to take a sector size as the buffer size. Talking about downloads is very special and it depends to a lot of things (server, proxy, modem/isdn/dsl, compressed communication, net traffic, ... ). The best way to find it out, is to try it for your own :-) Greetings, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]