[erlang-questions] Why is gen_server:call/1 so slow (3s) when used with {global, Name}?

Nicolas Charpentier <>
Thu Jun 18 23:46:30 CEST 2009


On Jun 18, 2009, at 11:19 PM, Sergey Samokhin wrote:

> Hello!
>
> The first call to gen_server involving global name resolving
> facilities is quite slow: it's about 3 sec. Is there something I can
> do with this?
>
> ....
> Yes, 3 seconds for the first call isn't something I should care about,
> but it makes init of my gen_servers much slower :(
>
> To make sure that it isn't a kind of black magic, I've reproduced this
> behavior some times on two separated computers; but I'm not sure if
> it's a bug.
>


Hi,

Those 3 seconds might be the time to establish the node connection and  
to synchronize  global.
Test again connecting your nodes before to start your gen_server.


Regards,
___
Nicolas Charpentier
http://charpi.net



More information about the erlang-questions mailing list