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

Ali Sabil <>
Fri Mar 25 23:08:04 CET 2016


Did you consider adding a swap file to your low memory machine?

On Fri, Mar 25, 2016 at 9:33 PM Benoit Chesneau <> wrote:

>
>
> On Friday, March 25, 2016, Michael Truog <> 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
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160325/3ff41ddd/attachment.html>


More information about the erlang-questions mailing list