[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving more than 1MB when installed

From: Stefan Monnier
Subject: Re: Saving more than 1MB when installed
Date: Sat, 02 Jun 2012 15:50:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> Try the patch below.  In my tests, adding the pre-loaded elc files in
> DOC results in a much larger DOC file (2.4MB vs 650KB), but doesn't save
> us anything in the `emacs' executable (neither pure space, nor live heap
> or executable size).

After further testing, it turns out that it does indeed save us about
24KB (on a 32bit system) of pure space (which corresponds to the about
3000 docstrings in the preloaded elc files).
And the 2.4M-vs-650K is brought down to 2.4M-vs-1.6M after fixing my
test to include loaddefs.el docstrings.

So for now, I think I'll just leave this alone.  I think a good
direction for change would be to populate the DOC file directly from
Lisp code rather than from make-docfile.c (e.g. from autoload.el and
from the byte-compiler), so we don't need hacks in lread.c that ignore
"things presumed to be docstrings that will hopefully later provided by
Snarf-documentation" and also so we avoid duplicating the docstrings in
loaddefs.el (and .elc files) and DOC.

Actually, changing bytecomp.el to do that it pretty easy (no harder than
what we currently do when outputting docstrings in a format sufficiently
restricted for make-docfile to later find them), the only problem is
in building the whole DOC file: currently we always rebuild it from
scratch, whereas the byte-compiler could only incrementally update it,
so we'd need to change the make-docfile side to update the file rather
than erase&rebuild.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]