all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Saving more than 1MB when installed
Date: Sat, 02 Jun 2012 15:50:37 -0400	[thread overview]
Message-ID: <jwvsjedecxw.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <jwvk3zzah3j.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 25 May 2012 21:10:38 -0400")

> 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.


        Stefan



      reply	other threads:[~2012-06-02 19:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-26  1:10 Saving more than 1MB when installed Stefan Monnier
2012-06-02 19:50 ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvsjedecxw.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.