Subject: Re: unload and "make clean" an asdf system?
From: (Rob Warnock)
Date: Wed, 31 Dec 2008 23:37:39 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
budden <> wrote:
| And your way is not very efficient. SBCL has a minimal image size of
| about 18Mb. If we load 100 systems, images will occupy 1800Mb on the disk
| and take a lot of time on disk operations.

That depends very much one exactly *which* "100 systems" you load.
Remember, SBCL's base image includes the compiler and the full CL
runtime; most additional systems you might add are *much* smaller
that that. And the same will be true for other CLs as well.

E.g., under CMUCL, the Unix/Linux executable is ~250 KB, the base
image is ~25 MB, but adding the following packages only adds the
indicated amounts to the heap size[1]:

    CFFI               ~0.6 MB
    LTk-0.90           ~1.4 MB
    cl-ppcre-0.7.6     ~1.0 MB
    cl-typesetting-2.1 ~7.5 MB [includes cl-pdf, cl-iterate, xml-render]

And those are the *big* ones! Things like SPLIT-SEQUENCE or META
are less than 100 KB each. Besides, who loads "100" systems into
an image anyway?!?

IME you *greatly* exaggerate the heap size and/or disk image size
of even a *VERY* rich CL execution environment. It would be quite
rare to find one over 100 MB...


[1] Measured by doing several (GC :FULL T) ops before and after
    the ASDF load of each [until "bytes retained" stabilizes],
    and taking the differences in the reported "GC completed
    with ${NNN} bytes retained" numbers. This will be close
    [though not identical] to the sizes added to a saved heap
    image on disk. For example, if I load all six packages
    mentioned above and then do a SAVE-LISP, the resulting
    image file on disk is only 9.8 MB larger than a one from
    a SAVE-LISP without loading those packages:

      $ ls -l *.image
      -rw-r--r--  1 rpw3  rpw3  25899008 Dec 31 21:16 initial.image
      -rw-r--r--  1 rpw3  rpw3  35692544 Dec 31 21:18 final.image

    And you save an *enormous* amount of startup time by doing it that way:

       $ time cmucl -core final.image -quiet \
		    -eval '(progn (print :hello)(terpri)(quit))'

       0.017u 0.017s 0:00.04 50.0%     192+2670k 0+0io 0pf+0w

Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607