|
-
March 19th, 2008, 10:46 AM
#2
Re: Improve data loading time, pre-caching?
 Originally Posted by Cyanide
when reading a data set that has recently been used (not necessarily the previous data set), loading time is around 1s.
- How come?
- Are these files in some kind of cache?
- Since the hard drive cache is 16MB I would not expect several hundred MB of files to be in the disk cache.
- Is there some other kind of cache around that helps improving the reading speed?
The HD has a cache itself, and it's possible the OS does buffering too.
is this the best way to do it or is there any other faster command to read lots of data?
There's an overloaded FileStream constructor that takes a 'FileOption' as a parameter. Setting FileOptions.SequentialScan may improve performance as the OS can use that as a hint that it should buffer the file.
www.monotorrent.com For all your .NET bittorrent needs
NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|