[erlang-questions] module preloading in embedded mode
Xavier Noria
fxn@REDACTED
Fri Jan 19 10:56:13 CET 2018
Ah! Even more.
I just realized that workflow does not seem to depend on the mode.
primLoad seems to be unconditionally processed, so I believe all modules in
the primLoads of whatever boot script is used are loaded into the BEAM
regardless of interactive/embedded.
In a release, you eager load all modules NOT because embedded mode is on,
but because the generated scripts lists them all in primLoads.
What embedded does is basically preventing the error handler from falling
back to the code server, here:
https://github.com/erlang/otp/blob/9ff28ca4095c7877f4f4a6cab4d691ba52f07372/lib/kernel/src/code_server.erl#L310-L318
That's an aha! moment for me. Because some docs imply that embedded mode
means eager loading.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180119/38f6afc0/attachment.htm>
More information about the erlang-questions
mailing list