From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Saving more than 1MB when installed Date: Fri, 25 May 2012 21:10:38 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1337994653 11374 80.91.229.3 (26 May 2012 01:10:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 26 May 2012 01:10:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 26 03:10:52 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SY5Wp-0004SQ-33 for ged-emacs-devel@m.gmane.org; Sat, 26 May 2012 03:10:47 +0200 Original-Received: from localhost ([::1]:36969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SY5Wo-0003xQ-K4 for ged-emacs-devel@m.gmane.org; Fri, 25 May 2012 21:10:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SY5Wl-0003xK-T5 for emacs-devel@gnu.org; Fri, 25 May 2012 21:10:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SY5Wj-0003n6-Jt for emacs-devel@gnu.org; Fri, 25 May 2012 21:10:43 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:35409) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SY5Wj-0003mo-Ff for emacs-devel@gnu.org; Fri, 25 May 2012 21:10:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvwEAG6Zu09MCpYd/2dsb2JhbABEtBGBCIJyciYYDYhFmFKhN40mgx4DliqNCYFYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="182589467" Original-Received: from 76-10-150-29.dsl.teksavvy.com (HELO pastel.home) ([76.10.150.29]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 May 2012 21:10:39 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 91F2F58ABA; Fri, 25 May 2012 21:10:38 -0400 (EDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150643 Archived-At: 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? Stefan === 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) > $(etc)/DOC - $(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` $(libsrc)/make-docfile$(EXEEXT): 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.