[erlang-questions] constructing binaries question

Taavi Talvik <>
Thu Sep 14 22:29:17 CEST 2006


> I think your solution will work for me. The final goal is to send the
> query to a socket, so the structure doesn't matter for pattern
> matching. However, I do have to send the query after it's constructed
> to an intermediate gen_server, which then sends the query to a process
> that owns the socket. I know that sending binary messages involves
> less copying than sending other types of messages, so I'm tempted to
> construct the queries as binaries before sending them anywhere.
>
> What's the best approach in this scenario?

As some gurus on this list have said:

	make it correct(working), optimize later

When application is ready and performance is not acceptable,
profile it. Quite likely you will find that time is spent somewhere
else.

best regards,
taavi




More information about the erlang-questions mailing list