[Ecls-list] Startup time

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Wed May 28 20:20:41 UTC 2008


On Wed, May 28, 2008 at 2:42 PM, Waldek Hebisch
<hebisch at math.uni.wroc.pl> wrote:
> Currently, large program compiled by ECL start up visibly slower
> than using other Lisps.

There is a reason for that. When ECL boots, it has to run through all
the code that loads the lisp library. In other words, it has to repeat
all the DEFUN DEFVAR, statements, etc. This is because there is not a
portable way to dump a memory image of all the required data and
installed C functions. Same thing applies to loading a FASL.

>  My estimate is that during FriCAS bootstrap
> main FriCAS binary is started up about 1000 times, each startup taking
> about 1s, which adds up to rather substantial 1000s.  Also during
> testsuite run FriCAS binary is invoked about 150 times, this time
> each invocation costs about 2.8s, for total of order 420s.  Below
> some measurement trying to find out reasons.

I see. I would like to understand why you need to load FriCAS 1000
times instead of reusing the same binary for building all compiled
files. Either directly, or using Unix fork().

> One case is ECL compiler:

Ok, here the case is not the compiler itself but the database of
profiled functions in sysfun.lsp. Perhaps we can dump it into a
quicker to load form.

> Another reason is that loading large number of fasls takes a lot of time.
> >From FriCAS prompt we load 1090 fasls:

Why don't you join all those fasl files into a single one using c:build?

> So, it seems that loading each fasl triggers garbage collection,
> and those collections are responsible for substantial part
> of the load time.  Is there a way to make garbage collection
> more lazy?

Sure! Remove the si_gc(Ct) statement in src/c/load.d and please tell
me whether this helps. I can remove it from the default configuration.

Juanjo

--
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list