TheMadHatter,
This is one of those things where you have to fine tune your code in
response to regular conditions.
I don't think a bufferedstream will work here because getting the bytes
is going to be a quick operation.
What you have to remember is that while you might decrease the number of
file operations by reading larger chunks from the file system, you have to
weigh that against the cost of memory allocation, which in large chunks, can
be more detrimental than the hit you would take reading from the file
system.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"TheMadHatter" <Th**********@discussions.microsoft.com> wrote in message
news:1A**********************************@microsof t.com...
Yello,
Quick Q:
What is the fastest way of getting data from a file?
Does the though put of the file increase if I collect
a great big chunk of it? Eg say 6meg? or does that
even help?
Does a bufferedstream work better if I am just going
to open a file and read it?
All I am doing, is opening the file stream,
collecting enough data for a "packet" of data,
parcing it, then going for another packet.
I though maybe if I collect a chunk of memory
from the HD, the speed may improve?
Thanks in advance.