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

Benoit Chesneau bchesneau@REDACTED
Fri Mar 25 22:33:23 CET 2016


On Friday, March 25, 2016, Michael Truog <mjtruog@REDACTED> wrote:

>
> Having the build process generate the module file and the beam file seems
> decent.  There isn't a need to build the module dynamically (during
> runtime, upon startup) or store the unicode data in global storage due to
> the unicode changes being infrequent.   Then, if you do need to update due
> to unicode changes, you can always hot-load a new version of the module,
> during runtime and the usage of the module shouldn't have problems with
> that, if it is kept as a simple utility/library module.  This problem
> reminds me of the code at https://github.com/rambocoder/unistring and
> there might be overlap in the goals of these two repositories.
>


this is what the current release (1.2) does. But it doesn't compile in
containers or machines =< 1GB. The build crash. This is why i'm looking at
shipping a pre-compiled beam. or maybe include the data in a db. but for
now my tests with a db file (ets) shows it's really slower 30-40ms vs 6ms
using maps and a pre-compiled beam. Also maps use less storage compared to
simply using function pattern matching in the beam.

- benoît
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160325/bcd97d28/attachment.htm>


More information about the erlang-questions mailing list