G
Guest
I have a VB.NET 1.1 app that must open/reopen and read hundreds (or sometimes
thousands) of large, multi-GB files and create one extremely large output
file (this is seismic data). I'm using the FileStream class for reading and
writing.
I need to improve its performance, so I first thought I would add my own
app-level buffering on the read-side. But that made it slower (and then I
realized that FileStream already did buffering...duh!)
Next I tried implementing a cache of open FileStream objects. In creating
its output, the app must close and re-open the same input files repeatedly
(extracting different data each time), so I was thinking that I could keep
some number of previously-opened FileStream objects (or references thereto)
in a list, in order to reduce the amount of closing/re-opening. But
surprisingly, that change also made the app slower. It's almost as if the CLR
or NTFS or Win (XP) is keeping recently-opened files - or at least
information about the files - around for a while, so when you re-reference
them, the re-open occurs very quickly (any opinions on whether this
conclusion is true???)
After a couple of weeks of experimentation and performance tests (and posts
to this and other ng's), I'm running out of ideas on how to make this app run
faster.
ANY advice would be greatly appreciated!
DT
thousands) of large, multi-GB files and create one extremely large output
file (this is seismic data). I'm using the FileStream class for reading and
writing.
I need to improve its performance, so I first thought I would add my own
app-level buffering on the read-side. But that made it slower (and then I
realized that FileStream already did buffering...duh!)
Next I tried implementing a cache of open FileStream objects. In creating
its output, the app must close and re-open the same input files repeatedly
(extracting different data each time), so I was thinking that I could keep
some number of previously-opened FileStream objects (or references thereto)
in a list, in order to reduce the amount of closing/re-opening. But
surprisingly, that change also made the app slower. It's almost as if the CLR
or NTFS or Win (XP) is keeping recently-opened files - or at least
information about the files - around for a while, so when you re-reference
them, the re-open occurs very quickly (any opinions on whether this
conclusion is true???)
After a couple of weeks of experimentation and performance tests (and posts
to this and other ng's), I'm running out of ideas on how to make this app run
faster.
ANY advice would be greatly appreciated!
DT