the user_default module

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Mon Aug 29 16:32:34 CEST 2005


I noticed when experimenting with the code_path_cache flag (which I just discovered), that the cache is always "rehashed" twice during a normal boot. After inserting some debug statements, I determined that the second time was when trying to load 'user_default'.

The 'user_default' module doesn't exist anywhere unless provided by the user. Granted, on my machine, running with erl boot start_sasl on an NFS-mounted directory, it took only 78 ms to rehash the cache, so the performance hit is hardly noticable. However, on a large system with a slow file system, it might matter (haven't measured that).

Regardless of how many milliseconds are saved or lost, I think that one should provide the modules one tries to load. Thus, a standard 'user_default' should be in stdlib. I tried inserting the following module:

-------------------------------------------
-module(user_default).
-export([]).
-------------------------------------------

It seems to work just fine.

/Uffe



More information about the erlang-questions mailing list