[Haskell-cafe] Memory problems reading a IntMap from a binary file
Ludger Steens
lutzsteens at gmx.de
Sun Aug 3 17:15:53 EDT 2008
Hi,
I have IntMap String with about 40,000 entries. After saving it to disk
(via Data.Binary) the file is 3.5 Mb small. However if I load it and
save it back again my program needs 180 MB memory. Is there anything I
do wrong or does the map really need that much memory?
The (simple) program I wrote:
main =
do
mp <- decodeFile "i.bin" :: IO ( IntMap String )
encodeFile "i2.bin" mp
exitWith ExitSuccess
Thanks,
Ludger
More information about the Haskell-Cafe
mailing list