|
Posted by Tony Marston on 07/11/06 14:31
"David Haynes" <david.haynes2@sympatico.ca> wrote in message
news:UXKsg.93009$NG4.13289@fe08.usenetserver.com...
> Tony Marston wrote:
>> I personally put the text for each language into a separate file, then
>> load that file into memory at the start of each script. Each individual
>> string is therefore taken from memory. Because there is only one disk I/O
>> for the whole file, not each piece of text, it is very fast.
>
> Wouldn't the number of disk I/Os depend on the size of the file and the
> size of the read buffer in the device driver?
Stop being pedantic. I'm talking about reading in the whole file into memory
in one operation instead of doing a separate read for each piece of text. So
in my code I perform a single read operation - how the operating system or
file system handles this, such as splitting the operation into several disk
accesses, or even retrieving from memory without accessing the disk at all,
is largely irrelevant.
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
[Back to original message]
|