SYNC vs ASYNC calls

Gaspar Chilingarov <>
Tue Jul 19 16:24:15 CEST 2005

Ulf Wiger wrote:

> I changed one line of code in tickplus.erl and added three
> to tickdb.erl, and now the program seems to be flying along:
> What I did: changed the gen_server:cast(DB, {'ADD'...}) to
> a gen_server:call().

I would like to suggest put this example somewhere into documentation or
efficiency guide -- i'd also hit the same problem in my program - i've
asked mailing list about poor performance of parses -- somthing like 400
comma separated lines/second. Later I've found that I hit erlang's
limits of message queue creation speed. changing call from async to
synchronous also bumped parse speed about 10 times.

I guess this is a standard error, which novices(and not so novices ;)))
  can do, thinking that passing confirmation message back to caller for
each parsed line it too much overhead -- thus writing programs which
flood worker process queue with messages.

Gaspar Chilingarov
System Administrator

t +37491 419763 (mob)
t +37410 240399 (office)
i 63174784

More information about the erlang-questions mailing list