[erlang-patches] gen:call({global, Name}, ...)

Geoff Cant nem@REDACTED
Wed Mar 30 03:19:59 CEST 2011


Hi all, I discovered today that gen:call({global, Name}, Label, Request,
Timeout) calls global:safe_whereis_name(Name) to determine the Pid to
look up globally registered names.

global:safe_whereis_name/1 doesn't seem to offer any particular safety
and more importantly, serializes all global name lookups on a node. (Using
global:whereis_name/1 instead is just an ets lookup).

Can we safely make a change like
https://github.com/archaelus/otp/commit/4f6e8a147b3c600eef2dd05f8ce0d51cf9c35383
in gen.erl and improve call time and reduce the load on
global_name_server at a stroke?

This git repo contains the patch I'm thinking of:
git fetch git://github.com/archaelus/otp.git gen_where

Cheers,
-- 
Geoff Cant



More information about the erlang-patches mailing list