[erlang-questions] pre-load large data files when the application start

Richard A. O'Keefe ok@REDACTED
Fri Apr 1 01:28:05 CEST 2016



On 31/03/16 11:54 pm, Benoit Chesneau wrote:
>
> Do you mean having different functions in the same module using a map 
> each?
Yes.  One change at a time!  It's the "column-oriented data base" idea.
Instead of
     f(X) -> maps:get(X, {... K => {U,V,W} ...}, false)
have
     u(X) -> maps:get(X, {...K => U...}, false).
     v(X) -> maps:get(X, {...K => V...}, false).
     w(X) -> maps:get(X, {...K=> W...}, false).

One reason is that in each column the set of keys with
non-default values is different, and another reason is
that callers don't *want* all the information, so they
have to spend time fishing what they do want out of
the triple.




More information about the erlang-questions mailing list