[erlang-questions] Why is erlc so quick to start?
Tue Jan 6 11:13:41 CET 2015
On Tue, Jan 6, 2015 at 12:06 AM, Loic Hoguin wrote:
> On 01/05/2015 11:19 PM, Tuncer Ayaz wrote:
> > On Mon, Jan 5, 2015 at 11:44 AM, Loic Hoguin wrote:
> > >
> > > It's actually quite funny how Erlang compiles many projects
> > > faster than it boots. :-)
> > A lot of "compilation" is also going on in the beam loader, so...
> Yes that also adds to the load time, but it probably wouldn't be too
> noticeable if erlc was loading only the modules it requires instead
> of everything. I don't think it uses the network code, dets, process
It can use the network code if code is not loaded from disk. Erlang's
distributed nature is the reason for some indirection you tried to
circumvent in, for example, file operations :).
> groups and so on, and it may also not need the whole OTP application
> I will play with generating a smaller boot file when I get the time
> and see what happens. If it can be made closer to 0s this would
> allow me to just use %.erl: %.beam rules, something that's been on
> my wishlist from the start.
Maybe the resulting boot file can be used for escript as well.
Also, the speedups we've discussed also apply to older versions and
are not fixing the overhead introduced between R13 and now. So, if
you're serious about this, and want to invest time, I'd suggest to
profile R13 against R14 and R15 with your trace/profile tool of choice
and see where time in (mostly) C and maybe Erlang is spent since >=R14.
More information about the erlang-questions