Date : Tue, 18 Jun 1996 10:13:33 +0100 (BST)
From : sf4000@... (Steven Flintham)
Subject: Re: DFS buffer sizes?
I know this message went out ages ago, but I have something vaguely
relevant to say, so I hope no-one minds. :-)
> I'd like to know the answer to the question because of the
> following reason:
> If the buffers are larger than, say, 2 pages, it is probably not
> worthwhile to implement (larger) buffers myself in software:
> the speed gain would be very small. If, however the buffer
> sizes are only, say, 1/2 page, it might be worthwhile to implement
> to implement buffers myself.
As someone else said, much nearer the time, the DFS buffers are 256
bytes. For a piece of software I was working on recently I tried
implementing my own buffering (I was only reading from the disc, not
writing), using OSGBPB to actually read the data from the file.
Interestingly I found that implementing my own 512 byte buffer speeded
things up a bit, quite a lot in some cases (I can't be sure, but I
think it helped most on ADFS) but that any larger buffer size gave
practically the same speed as the 512 byte one. I didn't do extensive
tests but I also found that in a few cases implementing my own buffer
was marginally slower than using OSBGET to read in the first place. Now
I come to write it down it seems even less likely than it did at the
time, but it could have been an error in my coding or it could have
something to do with the fact that I was also writing to another file
at the same time, which might complicate things in some way.
Anyway, I hope that's of some interest. I think I might try and
reproduce the 'OSBGET is faster' result over the summer, and if I do
I'll make the program available so someone else can have a look at it
and point out the obvious inefficiency in my code.