From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Date: Sat, 29 Aug 2009 17:34:35 -0400 Message-ID: References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> Reply-To: Stefan Monnier , 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 1251582440 22190 80.91.229.12 (29 Aug 2009 21:47:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Aug 2009 21:47:20 +0000 (UTC) Cc: 4287@emacsbugs.donarmstrong.com, bug-gnu-emacs To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 29 23:47:13 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 1MhVlP-0002W6-5U for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Aug 2009 23:47:11 +0200 Original-Received: from localhost ([127.0.0.1]:41907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhVlO-00071e-D4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Aug 2009 17:47:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhVlJ-000702-B9 for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 17:47:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhVlF-0006tD-4S for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 17:47:04 -0400 Original-Received: from [199.232.76.173] (port=44323 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhVlE-0006se-CY for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 17:47:00 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39410) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MhVlD-0002On-Mk for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 17:46:59 -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 n7TLks1F032221; Sat, 29 Aug 2009 14:46:57 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7TLe5Ma030328; Sat, 29 Aug 2009 14:40:05 -0700 Resent-Date: Sat, 29 Aug 2009 14:40:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 29 Aug 2009 21:40:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125158168428965 (code B ref -1); Sat, 29 Aug 2009 21:40:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 29 Aug 2009 21:34:44 +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 n7TLYgc3028956 for ; Sat, 29 Aug 2009 14:34:43 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhVZK-0001eG-1B for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 17:34:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhVZE-0001e2-Ln for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 17:34:40 -0400 Original-Received: from [199.232.76.173] (port=45876 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhVZE-0001dz-Fw for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 17:34:36 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:19981) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MhVZE-0008Pq-3A for bug-gnu-emacs@gnu.org; Sat, 29 Aug 2009 17:34:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmYFAPI6mUpFpYuS/2dsb2JhbACBU9RwhBoFh2iCbA X-IronPort-AV: E=Sophos;i="4.44,296,1249272000"; d="scan'208";a="44506903" Original-Received: from 69-165-139-146.dsl.teksavvy.com (HELO pastel.home) ([69.165.139.146]) by ironport2-out.teksavvy.com with ESMTP; 29 Aug 2009 17:33:34 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 55C947F42; Sat, 29 Aug 2009 17:34:35 -0400 (EDT) In-Reply-To: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Sat, 29 Aug 2009 11:41:58 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 29 Aug 2009 17:47:04 -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:30653 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 Can you show the patch? Stefan