[erlang-questions] Transferring list from java through JInterface
Martin Dimitrov
mrtndimitrov@REDACTED
Sat Nov 26 07:56:56 CET 2011
Hello,
I have a huge list, about 500K strings each containing 3 chars. I
noticed it is very slow to construct an OtpErlangList out of the Java
List<String> and to send it to the Erlang process. When constructing an
OptErlangBinary out of the Java List<String>, it takes no time to
transfer. The problem is that the list gets concatenated. Is there a way
to avoid it?
I also noticed that transferring a huge string (2.5MB) as
OtpErlangString is very slow while transferring it as OptErlangBinary is
very fast. Can you explain to me why is it so? Maybe I don't (fully)
understand the binary type.
Thank you,
Martin
More information about the erlang-questions
mailing list