[Haskell-cafe] Aeson memory use
Lana Black
lanablack at amok.cc
Wed Aug 8 19:54:07 UTC 2018
Hello Cafe,
Recently while trying to optimize some code, I noticed that aeson
requires quite a substantial amount of memory when parsing map-like
structures. The quick example I crafted [1] is quite surprising. In
order to parse an 11 megabyte file aeson requires around 300 megabytes
of memory (according to the heap profiler), and the total memory
footprint (according to htop) jumps to around 700 megabytes.
Is there a way to reduce this number to something less insane? I suspect
that I might be doing something wrong here, but I can't exactly see what.
[1] https://github.com/greydot/aeson-example
More information about the Haskell-Cafe
mailing list