[erlang-questions] Erlang RTMP library

Max Lapshin <>
Sun Dec 27 10:42:54 CET 2009


On Sun, Dec 27, 2009 at 10:12 AM, Rapsey <> wrote:
> There is one performance issue with the way it is designed:
>
> State#rtmp_socket{buffer = <<Buffer/binary, Data/binary>>
>
> This will cause binary to be reallocated and copied with every change.

As it is told in documentation, it may be optimized when there is
enough space in Buffer binary.
And I don't understand, how to do it better: if use list and
iolist_to_binary, so I will have
to make each time list and glue it, because data must be checked on
each incoming tcp message.


And how do You do?


More information about the erlang-questions mailing list