[erlang-questions] Erlang RTMP library

Rapsey <>
Sun Dec 27 11:34:46 CET 2009


On Sun, Dec 27, 2009 at 10:42 AM, Max Lapshin <> wrote:

> 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?
>


Well I don't need a very general purpose solution. I'm not fully clear on
how you implemented it, I am rather busy at the moment to look into it.
I have a RTMP process and its implementation (and state) is not visible from
outside. You send messages to it and receive responses back.


Sergej


More information about the erlang-questions mailing list