[Haskell-cafe] Re: bizarre memory usage with data.binary
Don Stewart
dons at galois.com
Tue Oct 2 20:38:01 EDT 2007
aeyakovenko:
> servers never terminate, pretend that i have a server that reads a
> list encoded with data.binary from a socket, and sums it up and
> returns the current sum. i would expect it to run in constant memory,
> never terminate, and do useful work.
>
> which is basically the problem that I am facing right now. my program
> seems to grow randomly in memory use when marshaling large data types
> encoded using data.binary.
If its specifically the list instance, where we currently trade laziness
for efficiency of encoding (which may or may not be the right thing),
I'd suggest a fully lazy encoding instance?
-- Don
More information about the Haskell-Cafe
mailing list