[Haskell-cafe] Lazy object deserialization
Scott Lawrence
bytbox at gmail.com
Wed Mar 13 05:15:32 CET 2013
Hey all,
All the object serialization/deserialization libraries I could find (pretty
much just binary and cereal) seem to be strict with respect to the actual data
being serialized. In particular, if I've serialized a large [Int] to a file,
and I want to get the first element, it seems I have no choice but to
deserialize the entire data structure. This is obviously an issue for large
data sets.
There are obvious workarounds (explicitly fetch elements from the "database"
instead of relying on unsafeInterleaveIO to deal with it all magically), but
it seems like it should be possible to build a cereal-like library that allows
proper lazy deserialization. Does it exist, and I've just missed it?
Thanks,
--
Scott Lawrence
Linux baidar 3.7.10-1-ARCH #1 SMP PREEMPT Thu Feb 28 09:50:17 CET 2013 x86_64 GNU/Linux
More information about the Haskell-Cafe
mailing list