From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Date: Sat, 29 Aug 2009 11:41:58 -0700 (PDT) Message-ID: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> Reply-To: Dan Nicolaescu , 4287@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251571650 28573 80.91.229.12 (29 Aug 2009 18:47:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Aug 2009 18:47:30 +0000 (UTC) To: bug-gnu-emacs Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 29 20:47:23 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MhSxN-0004YY-Uc for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Aug 2009 20:47:22 +0200 Original-Received: from localhost ([127.0.0.1]:53306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhSxM-0001mJ-L6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Aug 2009 14:47:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhSxB-0001jk-Nv for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 14:47:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhSx6-0001iB-Px for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 14:47:09 -0400 Original-Received: from [199.232.76.173] (port=45030 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhSx6-0001i8-NX for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 14:47:04 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:13559) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MhSx6-0000vw-8t for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 14:47:04 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MhSx5-0003mJ-DR for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 14:47:03 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7TIksU2016100; Sat, 29 Aug 2009 11:46:54 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7TIj5nK015648; Sat, 29 Aug 2009 11:45:05 -0700 Resent-Date: Sat, 29 Aug 2009 11:45:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 29 Aug 2009 18:45:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125157142515419 (code B ref -1); Sat, 29 Aug 2009 18:45:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 29 Aug 2009 18:43:45 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7TIhi5f015404 for ; Sat, 29 Aug 2009 11:43:45 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhStr-0000Am-Ou for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 14:43:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhStm-0000AY-1o for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 14:43:42 -0400 Original-Received: from [199.232.76.173] (port=47554 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhStl-0000AV-Sq for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 14:43:37 -0400 Original-Received: from barrelv2.ics.uci.edu ([128.195.1.114]:52815) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MhStl-00087c-8S for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 14:43:37 -0400 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n7TIfxL6028738 for ; Sat, 29 Aug 2009 11:41:59 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7TIfw4E003762; Sat, 29 Aug 2009 11:41:58 -0700 (PDT) Original-Lines: 22 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n7TIfxL6028738 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.363, required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_RW 0.08) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Resent-Date: Sat, 29 Aug 2009 14:47:09 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30649 Archived-At: As the Subject says, replacing each `load' line in loadup.el with `load' + `garbage-collect' will reduce the size of the stripped emacs binary: (.7 is before, .8 is after the change) $ ls -l emacs-23.1.50.8 emacs-23.1.50.7 -rwx------ 1 dann dann 6722788 Jul 24 14:20 emacs-23.1.50.8* -rwx------ 1 dann dann 6857956 Jul 24 14:20 emacs-23.1.50.7* $ size emacs-23.1.50.8 emacs-23.1.50.7 text data bss dec hex filename 1883659 4833256 0 6716915 667df3 emacs-23.1.50.8 1883659 4968424 0 6852083 688df3 emacs-23.1.50.7 so we get about 2% reduction by doing something very simple and safe... [This happens because loading multiple files generate more garbage that can be collected, but it is not returned to the OS, so it appears in the dumped image]. See the discussion on this topic on emacs-devel: http://permalink.gmane.org/gmane.emacs.devel/113176