High Erlang memory binary

Mike Benza mikebenza@REDACTED
Tue Jan 14 12:59:38 CET 2020


> 3. Any other suggestion on what I might be doing wrong?

I ran into a similar problem a few years ago.  I was using jiffy to decode
JSON blobs.  Jiffy gave me back sliced binaries from the original binary I
passed in.  This kept the whole binary in memory, even if I was just using
a tiny portion of it and discarding the rest.  If you're doing this
(unlikely that you've run into the exact same problem), use the
copy_strings option to jiffy.

If not, consider looking for other cases where you start with a large
binary, discard most of it, and keep a small portion of it.  That may be
the cause of your binary bloat.  If you find something like that, try
copying the binaries in a way that causes the original binary to be
released from memory.

- Mike

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20200114/47873cf4/attachment.htm>

More information about the erlang-questions mailing list