[erlang-questions] clarify: Sending big messages

Zoltan Peter Toth zoltan.peter.toth@REDACTED
Wed Oct 22 11:36:38 CEST 2008


Hi,

We have a function like this:

deliver(Port, Data) ->
    Port ! {data, Data}.

This function returns Data.
Let's assume we want to send a big binary. If we call deliver(Port, 
BigBinary), is there any performance
penalty that results from handling the return value (that equals 
BigBinary) ?

Can it cause extra CPU/memory consumption later on e.g. during garbage 
collection ?

I.e. is it worth changing deliver() to return just ok ?
(This would be probably a good idea if this function is invoked via rpc.)

Best regs,
   /Zoltan




More information about the erlang-questions mailing list