Re: File Stream - Performance is getting slower and slower - why?
- From: Markus <difh04-gen1REMOVE@xxxxxxxxxxxx>
- Date: Fri, 21 Apr 2006 18:30:00 +0200
colRawDataFile
This is the key point in this routine - it's basically the entire
file, loaded into a collection - therefore, this collection has
334,386 entries in it.
And why do you load the entire file into a collection??? This doesn't
make sense to me (but maybe I don't have a complete understanding of
your solution)... I would try an approach like this (pseudo code):
FileReader input = ...;
FileWriter output = ...;
string data;
while (input is not EOF)
{
if (i = 50000)
{
// close old output
// create new output
}
output.write(input.ReadLine());
}
no need to fetch all lines into memory (a collection).
hth
Markus
.
- References:
- Prev by Date: RE: Delegate comparisons
- Next by Date: Re: Video : picture by picture
- Previous by thread: Re: File Stream - Performance is getting slower and slower - why?
- Next by thread: Re: File Stream - Performance is getting slower and slower - why?
- Index(es):
Relevant Pages
|
|