From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: reducing emacs size by more frequent garbage-collect in loadup.el Date: Sun, 16 Aug 2009 12:06:23 -0700 (PDT) Message-ID: <200908161906.n7GJ6Npw019588@godzilla.ics.uci.edu> References: <200907261756.n6QHuRSS010699@godzilla.ics.uci.edu> <200907261857.n6QIvEBe011431@godzilla.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250449703 311 80.91.229.12 (16 Aug 2009 19:08:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Aug 2009 19:08:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 16 21:08:15 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mcl5T-0000Df-56 for ged-emacs-devel@m.gmane.org; Sun, 16 Aug 2009 21:08:15 +0200 Original-Received: from localhost ([127.0.0.1]:60565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mcl5S-0004um-DI for ged-emacs-devel@m.gmane.org; Sun, 16 Aug 2009 15:08:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mcl5N-0004uf-PS for emacs-devel@gnu.org; Sun, 16 Aug 2009 15:08:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mcl5I-0004ru-CJ for emacs-devel@gnu.org; Sun, 16 Aug 2009 15:08:08 -0400 Original-Received: from [199.232.76.173] (port=38875 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mcl5I-0004rr-5b for emacs-devel@gnu.org; Sun, 16 Aug 2009 15:08:04 -0400 Original-Received: from sallyv2.ics.uci.edu ([128.195.1.120]:51827) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1Mcl5H-00089d-KZ for emacs-devel@gnu.org; Sun, 16 Aug 2009 15:08:03 -0400 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n7GJ6NpO016438; Sun, 16 Aug 2009 12:06:24 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7GJ6Npw019588; Sun, 16 Aug 2009 12:06:23 -0700 (PDT) In-Reply-To: <200907261857.n6QIvEBe011431@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Sun, 26 Jul 2009 11:57:14 -0700 (PDT)") Original-Lines: 32 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n7GJ6NpO016438 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-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114323 Archived-At: Dan Nicolaescu writes: > Stefan Monnier writes: > > > > 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]. > > > > > Should we make this change? > > > > I'd rather not uglify loadup.el with tons of calls to garbage-collect, > > but maybe it's OK to replace all calls to load by calls to load&gc. > > BTW, how does it affect the time to dump Emacs? > > It's in the noise for a 3 year old machine that I tried it on. Ping. Any decision on this?