in reply to read huge file
Try benchmarking your code to see if that really is the problem, first.
If that is indeed where the slowdown occurs, consider reading in more manageable chunks by adjusting the input record separator. If a line is extremely long, you can run into trouble reallocating slowly up to 35 megs of ram, a few k at a time. If your records are still large, but of a known size, you can pre-allocate your storage variable to fatten it up for the task.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: read huge file
by FloydATC (Deacon) on Aug 07, 2009 at 16:36 UTC |