<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The map() type now has iterators, so you can gradually iterate over the map rather than having to convert it all at once. Maybe that is what is helping you.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">However, I'd strongly recommend you start building up a scheme in which you chunk the large messages into smaller messages with some kind of continuation token. Large messages are bound to create trouble at some point. You can also toy with the idea of moving the code to the data rather than data to the code.<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 27, 2018 at 4:19 PM Aaron Seigo <<a href="mailto:aseigo@mykolab.com">aseigo@mykolab.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello! :)<br>
<br>
I have a distributed (in the Erlang sense) application which often <br>
produces moderately-sized maps (10k+ entries with lots of tuples in the <br>
mix) which in the past have given inter-node message passing serious <br>
problems: the vm would lock for a long while, use several GB of RAM, and <br>
usually eventually give up. When it didn't outright crash, it would <br>
produce message sizes too big to send between nodes, and/or the <br>
heartbeat messages between nodes would time out resulting in breakage. <br>
Running the same terms through `term_to_binary` produces similar <br>
results.<br>
<br>
The good news is that in OTP 21.0 things are quite a bit better: <br>
serialization of the maps goes a lot quicker, memory usage is now only <br>
~500MB per encoding for terms which would quickly balloon in the <br>
multiple GB's, ... so there is progress and that is really fantastic.<br>
<br>
Is 21.0 using something other than `term_to_binary` now for inter-node <br>
messages?<br>
<br>
Is it still using the "standard" external term format?<br>
<br>
Where in the OTP source tree can one find the relevant code?<br>
<br>
Cheers!<br>
<br>
--<br>
Aaron Seigo<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">J.</div>