[Top][All Lists]

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

Saving more than 1MB when installed

From: Stefan Monnier
Subject: Saving more than 1MB when installed
Date: Fri, 25 May 2012 21:10:38 -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).

I propose we get rid of this "optimization", which is brittle anyway (it
relies on lib-src/make-docfile finding all the docstrings and matching
defvar/defuns in the .elc file, which can be pretty difficult).

Any objection?


=== modified file 'src/Makefile.in'
--- src/Makefile.in     2012-05-22 16:20:27 +0000
+++ src/Makefile.in     2012-05-26 00:56:02 +0000
@@ -424,7 +424,7 @@
 $(etc)/DOC: $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp)
        -rm -f $(etc)/DOC
        $(libsrc)/make-docfile -d $(srcdir) $(SOME_MACHINE_OBJECTS) $(obj) > 
-       $(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) `sed -n -e 's| 
\\\\||' -e 's|^[   ]*$$(lispsource)/||p' $(srcdir)/lisp.mk`
+       #$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) `sed -n -e 's| 
\\\\||' -e 's|^[  ]*$$(lispsource)/||p' $(srcdir)/lisp.mk`
        cd $(libsrc); $(MAKE) $(MFLAGS) make-docfile$(EXEEXT)

=== modified file 'src/lread.c'
--- src/lread.c 2012-05-25 18:06:13 +0000
+++ src/lread.c 2012-05-26 00:59:20 +0000
@@ -3548,7 +3548,7 @@
              if (ch == ')')
                  if (doc_reference == 1)
-                   return make_number (0);
+                   /* return make_number (0) */;
                  if (doc_reference == 2)
                      /* Get a doc string from the file we are loading.

reply via email to

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