[Haskell-cafe] Re: Processing of large files

John Goerzen jgoerzen at complete.org
Tue Nov 2 10:01:14 EST 2004


On 2004-11-01, Peter Simons <simons at cryp.to> wrote:
> Alexander N Kogan writes:
>
> > I'm newbie and I don't understand how to process large
> > files in haskell with constant memory requirements.
>
> Read and process the file in blocks:
>
>   http://cryp.to/blockio/docs/tutorial.html

I don't think that would really save much memory, and in fact, would
likely just make the code a lot more complex.  It seems like a simple
wrapper around hGetContents over a file that uses block buffering would
suffice.  (The block buffering to boost performace.)

-- John




More information about the Haskell-Cafe mailing list