|
|
Warp <war### [at] tagpovrayorg> wrote:
> That didn't really answer the question of whether it is able to drop
> the parts which are no longer used.
no, I don't think readFile per se is a great means of working with large files.
It binds the whole contents as a string to a "variable" and even if you process
it by reading only a few chunks, the already read content is supposedly being
accumulated in the binding "variable". I don't think if you go back and read
chunks from the beginning of the string the function actually goes back and
performs IO to read that position again.
laziness is great for highly abstract algebraic datatypes, but not that great
for IO. For that, you have buffered IO just like in other languages (except
for being monadic).
Post a reply to this message
|
|