[erlang-questions] Why is erlc so quick to start?
Björn-Egil Dahlberg
wallentin.dahlberg@REDACTED
Mon Jan 5 18:12:54 CET 2015
As I mentioned in a previous thread, the start time of escript and erl is
to an high degree influenced by the all the modules that needs to be
loaded.
This is also why +A0 has an impact.
I have to caution you to use +A0 though. Short-circuiting file operation by
using no async-threads may be hazardous to your system. In most cases it is
just fine to use it but this is very unpredictable. The schedulers can
become very unhappy.
We can change the default arguments to escript to mitigate this, for
instance:
https://github.com/psyeugenic/otp/compare/erlang:master...egil/default-escript-arguments
As for something more rigorous: Dizzy had a proposal of creating escripts
with a beam-binary with erlang-archives appended to it. I don't know how
far he got but with this. Something like that might go a long way to speed
things up.
// Björn-Egil
2015-01-05 16:08 GMT+01:00 Tristan Sloughter <t@REDACTED>:
> I added all those arguments to rebar3's escript and seems to be a
> consistent speedup as expected, dropping from 0.6s to 0.3s for a run
> that doesn't do anything but print the help.
>
> Can't say that my eyes see much of a difference though ;). But no reason
> not to keep it in.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150105/5df998f4/attachment.htm>
More information about the erlang-questions
mailing list