From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Reply-To: Dan Nicolaescu , 4287@debbugs.gnu.org Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 29 Aug 2009 18:45:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125157142515419 (code B ref -1); Sat, 29 Aug 2009 18:45:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 29 Aug 2009 18:43:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.2 required=4.0 tests=AWL,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 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 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 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 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 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 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) 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) Date: Sat, 29 Aug 2009 11:41:58 -0700 (PDT) Message-Id: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> From: Dan Nicolaescu To: bug-gnu-emacs Lines: 22 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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) 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 From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Reply-To: Stefan Monnier , 4287@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 29 Aug 2009 21:40:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125158168428965 (code B ref -1); Sat, 29 Aug 2009 21:40:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 29 Aug 2009 21:34:44 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 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 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 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 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 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" 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 Received: by pastel.home (Postfix, from userid 20848) id 55C947F42; Sat, 29 Aug 2009 17:34:35 -0400 (EDT) From: Stefan Monnier To: Dan Nicolaescu Cc: 4287@debbugs.gnu.org, bug-gnu-emacs Message-ID: References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> Date: Sat, 29 Aug 2009 17:34:35 -0400 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) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. > 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 From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Reply-To: Dan Nicolaescu , 4287@debbugs.gnu.org Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 30 Aug 2009 06:15:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.125161256930244 (code B ref 4287); Sun, 30 Aug 2009 06:15:05 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 30 Aug 2009 06:09:29 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7U69SWk030231 for <4287@emacsbugs.donarmstrong.com>; Sat, 29 Aug 2009 23:09:29 -0700 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 n7U69BDX022165; Sat, 29 Aug 2009 23:09:11 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7U69Axh009778; Sat, 29 Aug 2009 23:09:10 -0700 (PDT) Date: Sat, 29 Aug 2009 23:09:10 -0700 (PDT) Message-Id: <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Stefan Monnier Cc: 4287@debbugs.gnu.org References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> In-Reply-To: (Stefan Monnier's message of "Sat, 29 Aug 2009 17:34:35 -0400") Lines: 310 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n7U69BDX022165 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=0.336, required 5, autolearn=disabled, ALL_TRUSTED -1.44, FF_IHOPE_YOU_SINK 1.70, TW_RW 0.08) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu 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]. > > > See the discussion on this topic on emacs-devel: > > http://permalink.gmane.org/gmane.emacs.devel/113176 > > Can you show the patch? Sure: --- loadup.el.~1.180.~ 2009-08-20 23:31:53.000000000 -0700 +++ loadup.el 2009-08-29 23:02:34.000000000 -0700 @@ -57,30 +57,49 @@ (setq buffer-undo-list t) (load "emacs-lisp/byte-run") +(garbage-collect) (load "emacs-lisp/backquote") +(garbage-collect) (load "subr") +(garbage-collect) ;; We specify .el in case someone compiled version.el by mistake. (load "version.el") +(garbage-collect) (load "widget") +(garbage-collect) (load "custom") +(garbage-collect) (load "emacs-lisp/map-ynp") +(garbage-collect) (load "cus-start") +(garbage-collect) (load "international/mule") +(garbage-collect) (load "international/mule-conf.el") ;Don't get confused if someone compiled this by mistake. +(garbage-collect) (load "env") +(garbage-collect) (load "format") +(garbage-collect) (load "bindings") +(garbage-collect) (setq load-source-file-function 'load-with-code-conversion) (load "files") +(garbage-collect) (load "cus-face") +(garbage-collect) (load "faces") ; after here, `defface' may be used. +(garbage-collect) (load "minibuffer") +(garbage-collect) (load "button") +(garbage-collect) (load "startup") +(garbage-collect) (message "Lists of integers (garbage collection statistics) are normal output") (message "while building Emacs; they do not indicate a problem.") @@ -94,133 +113,220 @@ (message "%s" (garbage-collect)) (load "abbrev") ;lisp-mode.el and simple.el use define-abbrev-table. +(garbage-collect) (load "simple") +(garbage-collect) (load "help") +(garbage-collect) (load "jka-cmpr-hook") +(garbage-collect) (load "epa-hook") +(garbage-collect) ;; Any Emacs Lisp source file (*.el) loaded here after can contain ;; multilingual text. (load "international/mule-cmds") +(garbage-collect) (load "case-table") +(garbage-collect) (load "international/characters") +(garbage-collect) (load "composite") +(garbage-collect) ;; This file doesn't exist when building Emacs from CVS. It is ;; generated just after temacs is build. (load "international/charprop.el" t) +(garbage-collect) ;; Load language-specific files. (load "language/chinese") +(garbage-collect) (load "language/cyrillic") +(garbage-collect) (load "language/indian") +(garbage-collect) (load "language/sinhala") +(garbage-collect) (load "language/english") +(garbage-collect) (load "language/ethiopic") +(garbage-collect) (load "language/european") +(garbage-collect) (load "language/czech") +(garbage-collect) (load "language/slovak") +(garbage-collect) (load "language/romanian") +(garbage-collect) (load "language/greek") +(garbage-collect) (load "language/hebrew") +(garbage-collect) (load "language/japanese") +(garbage-collect) (load "language/korean") +(garbage-collect) (load "language/lao") +(garbage-collect) (load "language/tai-viet") +(garbage-collect) (load "language/thai") +(garbage-collect) (load "language/tibetan") +(garbage-collect) (load "language/vietnamese") +(garbage-collect) (load "language/misc-lang") +(garbage-collect) (load "language/utf-8-lang") +(garbage-collect) (load "language/georgian") +(garbage-collect) (load "language/khmer") +(garbage-collect) (load "language/burmese") +(garbage-collect) (load "language/cham") +(garbage-collect) (load "indent") +(garbage-collect) (load "window") +(garbage-collect) (load "frame") +(garbage-collect) (load "term/tty-colors") +(garbage-collect) (load "font-core") +(garbage-collect) ;; facemenu must be loaded before font-lock, because `facemenu-keymap' ;; needs to be defined when font-lock is loaded. (load "facemenu") +(garbage-collect) (load "emacs-lisp/syntax") +(garbage-collect) (load "font-lock") +(garbage-collect) (load "jit-lock") +(garbage-collect) (if (fboundp 'track-mouse) (progn (load "mouse") + (garbage-collect) (and (boundp 'x-toolkit-scroll-bars) - (load "scroll-bar")) - (load "select"))) + (load "scroll-bar") + (garbage-collect)) + (load "select") + (garbage-collect))) (load "emacs-lisp/timer") +(garbage-collect) (load "isearch") +(garbage-collect) (load "rfn-eshadow") +(garbage-collect) (message "%s" (garbage-collect)) (load "menu-bar") +(garbage-collect) (load "paths.el") ;Don't get confused if someone compiled paths by mistake. +(garbage-collect) (load "emacs-lisp/lisp") +(garbage-collect) (load "textmodes/page") +(garbage-collect) (load "register") +(garbage-collect) (load "textmodes/paragraphs") +(garbage-collect) (load "emacs-lisp/lisp-mode") +(garbage-collect) (load "textmodes/text-mode") +(garbage-collect) (load "textmodes/fill") (message "%s" (garbage-collect)) (load "replace") +(garbage-collect) (load "buff-menu") +(garbage-collect) (if (fboundp 'x-create-frame) (progn (load "fringe") + (garbage-collect) (load "image") + (garbage-collect) (load "international/fontset") + (garbage-collect) (load "dnd") + (garbage-collect) (load "mwheel") - (load "tool-bar"))) + (garbage-collect) + (load "tool-bar") + (garbage-collect))) (if (featurep 'x) (progn (load "x-dnd") + (garbage-collect) (load "term/common-win") - (load "term/x-win"))) + (garbage-collect) + (load "term/x-win") + (garbage-collect))) (message "%s" (garbage-collect)) (if (eq system-type 'windows-nt) (progn (load "w32-vars") + (garbage-collect) (load "term/common-win") + (garbage-collect) (load "term/w32-win") + (garbage-collect) (load "ls-lisp") + (garbage-collect) (load "disp-table") + (garbage-collect) (load "dos-w32") - (load "w32-fns"))) + (garbage-collect) + (load "w32-fns") + (garbage-collect))) (if (eq system-type 'ms-dos) (progn (load "dos-w32") + (garbage-collect) (load "dos-fns") + (garbage-collect) (load "dos-vars") + (garbage-collect) ;; Don't load term/common-win: it isn't appropriate for the `pc' ;; ``window system'', which generally behaves like a terminal. (load "term/pc-win") + (garbage-collect) (load "ls-lisp") - (load "disp-table"))) ; needed to setup ibm-pc char set, see internal.el + (garbage-collect) + (load "disp-table") + (garbage-collect))) ; needed to setup ibm-pc char set, see internal.el (if (featurep 'ns) (progn (load "emacs-lisp/easymenu") ;; for platform-related menu adjustments - (load "term/ns-win"))) + (garbage-collect) + (load "term/ns-win") + (garbage-collect))) (if (fboundp 'atan) ; preload some constants and (progn ; floating pt. functions if we have float support. - (load "emacs-lisp/float-sup"))) + (load "emacs-lisp/float-sup") + (garbage-collect))) (message "%s" (garbage-collect)) (load "vc-hooks") +(garbage-collect) (load "ediff-hook") -(if (fboundp 'x-show-tip) (load "tooltip")) +(garbage-collect) +(if (fboundp 'x-show-tip) (progn (load "tooltip") (garbage-collect))) (message "%s" (garbage-collect)) From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Reply-To: Eli Zaretskii , 4287@debbugs.gnu.org Resent-From: Eli Zaretskii Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 30 Aug 2009 18:10:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.125165536619908 (code B ref 4287); Sun, 30 Aug 2009 18:10:09 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 30 Aug 2009 18:02:46 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7UI2iIN019901 for <4287@emacsbugs.donarmstrong.com>; Sun, 30 Aug 2009 11:02:45 -0700 Received: from conversion-daemon.i_mtaout3.012.net.il by i_mtaout3.012.net.il (HyperSendmail v2004.12) id <0KP700000BFWPV00@i_mtaout3.012.net.il> for 4287@emacsbugs.donarmstrong.com; Sun, 30 Aug 2009 21:02:38 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.144.38]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KP700KLCBGBUT00@i_mtaout3.012.net.il>; Sun, 30 Aug 2009 21:02:36 +0300 (IDT) Date: Sun, 30 Aug 2009 21:00:33 +0300 From: Eli Zaretskii In-reply-to: <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> X-012-Sender: halo1@inter.net.il To: Dan Nicolaescu Cc: monnier@iro.umontreal.ca, 4287@debbugs.gnu.org Message-id: <83r5ut9o72.fsf@gnu.org> References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> > Date: Sat, 29 Aug 2009 23:09:10 -0700 (PDT) > From: Dan Nicolaescu > Cc: 4287@emacsbugs.donarmstrong.com > > --- loadup.el.~1.180.~ 2009-08-20 23:31:53.000000000 -0700 > +++ loadup.el 2009-08-29 23:02:34.000000000 -0700 > @@ -57,30 +57,49 @@ > (setq buffer-undo-list t) > > (load "emacs-lisp/byte-run") > +(garbage-collect) > (load "emacs-lisp/backquote") > +(garbage-collect) > (load "subr") > +(garbage-collect) > > ;; We specify .el in case someone compiled version.el by mistake. > (load "version.el") > +(garbage-collect) Perhaps a new function `load-and-gc' would be a good idea. From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Reply-To: Stefan Monnier , 4287@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 30 Aug 2009 20:10:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.125166269413884 (code B ref 4287); Sun, 30 Aug 2009 20:10:06 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 30 Aug 2009 20:04:54 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7UK4qEt013875 for <4287@emacsbugs.donarmstrong.com>; Sun, 30 Aug 2009 13:04:54 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYEAJd3mkpFpYuS/2dsb2JhbACBU9N5hBoFh2iCbA X-IronPort-AV: E=Sophos;i="4.44,300,1249272000"; d="scan'208";a="44550473" Received: from 69-165-139-146.dsl.teksavvy.com (HELO pastel.home) ([69.165.139.146]) by ironport2-out.teksavvy.com with ESMTP; 30 Aug 2009 16:03:43 -0400 Received: by pastel.home (Postfix, from userid 20848) id 9BACE7F42; Sun, 30 Aug 2009 16:04:46 -0400 (EDT) From: Stefan Monnier To: Dan Nicolaescu Cc: 4287@debbugs.gnu.org Message-ID: References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> Date: Sun, 30 Aug 2009 16:04:46 -0400 In-Reply-To: <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Sat, 29 Aug 2009 23:09:10 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> Can you show the patch? > Sure: Sorry, too ugly to be worth the few bytes (especially since these are bytes you'll be using anyway as soon as you start Emacs). Stefan From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Reply-To: Juanma Barranquero , 4287@debbugs.gnu.org Resent-From: Juanma Barranquero Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 30 Aug 2009 20:50:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.125166513123207 (code B ref 4287); Sun, 30 Aug 2009 20:50:07 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 30 Aug 2009 20:45:31 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.1 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-fx0-f213.google.com (mail-fx0-f213.google.com [209.85.220.213]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7UKjTrR023187 for <4287@emacsbugs.donarmstrong.com>; Sun, 30 Aug 2009 13:45:30 -0700 Received: by fxm9 with SMTP id 9so2750931fxm.1 for <4287@emacsbugs.donarmstrong.com>; Sun, 30 Aug 2009 13:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=3IzQafc00S4sulUf9DVdLTjuUSjsUkal2AjV1hcf9Qw=; b=O1WAdm9LVP3zU/J4ObFIe+WPd5Mgf5mkOsC9mPMQLToFS8zRQFQ+uCJs4xy+7xsCyc fOLysba7WpWbvPD5YNWhgJn+NK/tpvzZfIOuKzCzpU3dNT7X3iEkULGMXzklthWZbOok ih8aBgLBgs9AfuAo4GEdsyS32G57i2TaRx7Ak= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=v7nyZqdEkuvca8w0nqzKA7rQkGWwjXXHTTL3VoXhskdJuNI6NFRwg7Fdy2EL08szoI 2BhOoqWN83iR4lvqPaoz5FJMCpSqL+1lSBk3WQVMU3anh4snGGbqtawt402xVsy753q8 2mo3nu4AtcVn5mM7C7OEQP+wYgfV5obAQsikM= MIME-Version: 1.0 Received: by 10.239.130.35 with SMTP id 35mr377267hbh.31.1251665123072; Sun, 30 Aug 2009 13:45:23 -0700 (PDT) In-Reply-To: References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> From: Juanma Barranquero Date: Sun, 30 Aug 2009 22:45:03 +0200 Message-ID: To: Stefan Monnier Cc: 4287@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 On Sun, Aug 30, 2009 at 22:04, Stefan Monnier wrote: > Sorry, too ugly to be worth the few bytes (especially since these are > bytes you'll be using anyway as soon as you start Emacs). I've often wondered why there is no `after-load-hook' or `after-load-functions', run directly from (the end of) Fload. Then we could do now --- loadup.el 21 Aug 2009 06:19:28 -0000 1.180 +++ loadup.el 30 Aug 2009 20:44:10 -0000 @@ -57,4 +57,5 @@ (setq buffer-undo-list t) +(add-hook 'after-load-hook 'garbage-collect) (load "emacs-lisp/byte-run") (load "emacs-lisp/backquote") @@ -286,4 +287,5 @@ (load "site-init" t) (setq current-load-list nil) +(remove-hook 'after-load-hook 'garbage-collect) ;; Write the value of load-history into fns-VERSION.el, which is not so easy or elegant with `after-load-alist' (whose regexp-matching functionality is implemented in elisp, AFAICS). Juanma From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Reply-To: Juri Linkov , 4287@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 31 Aug 2009 00:05:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.125167657830800 (code B ref 4287); Mon, 31 Aug 2009 00:05:07 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 30 Aug 2009 23:56:18 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx2.starman.ee (smtp-out2.starman.ee [85.253.0.4]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7UNuGCL030793 for <4287@emacsbugs.donarmstrong.com>; Sun, 30 Aug 2009 16:56:17 -0700 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.28.7.cable.starman.ee [82.131.28.7]) by mx2.starman.ee (Postfix) with ESMTP id E84C33F4160; Mon, 31 Aug 2009 02:56:09 +0300 (EEST) From: Juri Linkov To: Stefan Monnier Cc: 4287@debbugs.gnu.org, Dan Nicolaescu Organization: JURTA References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> Date: Mon, 31 Aug 2009 02:55:55 +0300 In-Reply-To: (Stefan Monnier's message of "Sun, 30 Aug 2009 16:04:46 -0400") Message-ID: <87d46c501g.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>> Can you show the patch? >> Sure: > > Sorry, too ugly to be worth the few bytes (especially since these are > bytes you'll be using anyway as soon as you start Emacs). Can't we set gc-cons-percentage or gc-cons-threshold to a lower value in loadup.el to more frequent GC? -- Juri Linkov http://www.jurta.org/emacs/ From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Reply-To: Dan Nicolaescu , 4287@debbugs.gnu.org Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 31 Aug 2009 04:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.125169276820306 (code B ref 4287); Mon, 31 Aug 2009 04:30:03 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 31 Aug 2009 04:26:08 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7V4Q7kZ020300 for <4287@emacsbugs.donarmstrong.com>; Sun, 30 Aug 2009 21:26:08 -0700 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 n7V4PtBh028946; Sun, 30 Aug 2009 21:25:55 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7V4PsYY019622; Sun, 30 Aug 2009 21:25:54 -0700 (PDT) Date: Sun, 30 Aug 2009 21:25:54 -0700 (PDT) Message-Id: <200908310425.n7V4PsYY019622@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Stefan Monnier Cc: 4287@debbugs.gnu.org References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> In-Reply-To: (Stefan Monnier's message of "Sun, 30 Aug 2009 16:04:46 -0400") Lines: 10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n7V4PtBh028946 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu Stefan Monnier writes: > >> Can you show the patch? > > Sure: > > Sorry, too ugly to be worth the few bytes (especially since these are > bytes you'll be using anyway as soon as you start Emacs). How about another suggested method that is not ugly: a load-and-gc function? From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect Reply-To: Stefan Monnier , 4287@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 31 Aug 2009 14:55:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.125173000015029 (code B ref 4287); Mon, 31 Aug 2009 14:55:09 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 31 Aug 2009 14:46:40 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7VEkcuc015017 for <4287@emacsbugs.donarmstrong.com>; Mon, 31 Aug 2009 07:46:40 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAEJ/m0pFpYuS/2dsb2JhbACBU9ZJhBoFh2g X-IronPort-AV: E=Sophos;i="4.44,305,1249272000"; d="scan'208";a="44603970" Received: from 69-165-139-146.dsl.teksavvy.com (HELO ceviche.home) ([69.165.139.146]) by ironport2-out.teksavvy.com with ESMTP; 31 Aug 2009 10:45:28 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 0BC1E70048; Mon, 31 Aug 2009 10:46:33 -0400 (EDT) From: Stefan Monnier To: Juanma Barranquero Cc: 4287@debbugs.gnu.org Message-ID: References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> Date: Mon, 31 Aug 2009 10:46:32 -0400 In-Reply-To: (Juanma Barranquero's message of "Sun, 30 Aug 2009 22:45:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> Sorry, too ugly to be worth the few bytes (especially since these are >> bytes you'll be using anyway as soon as you start Emacs). > I've often wondered why there is no `after-load-hook' or > `after-load-functions', run directly from (the end of) Fload. Then we > could do now We could replace the call from C to do-after-load-evaluation by Frun_hooks(Qafter-load-functions), either passing it the file name explicitly or making sure load-file-name is still set. > which is not so easy or elegant with `after-load-alist' (whose > regexp-matching functionality is implemented in elisp, AFAICS). Doesn't something like (push '("" (garbage-collect)) after-load-alist) do the trick? Oh I see it doesn't because we check purify-flag. Clearly this check could be removed if we use after-load-functions. Stefan From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Reply-To: Stefan Monnier , 4287@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 31 Aug 2009 14:55:14 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.125173018515469 (code B ref 4287); Mon, 31 Aug 2009 14:55:14 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 31 Aug 2009 14:49:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7VEnhO6015464 for <4287@emacsbugs.donarmstrong.com>; Mon, 31 Aug 2009 07:49:44 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAEJ/m0pFpYuS/2dsb2JhbACBU9ZJhBoFh2iCbA X-IronPort-AV: E=Sophos;i="4.44,305,1249272000"; d="scan'208";a="44604387" Received: from 69-165-139-146.dsl.teksavvy.com (HELO ceviche.home) ([69.165.139.146]) by ironport2-out.teksavvy.com with ESMTP; 31 Aug 2009 10:48:33 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 20D2870048; Mon, 31 Aug 2009 10:49:37 -0400 (EDT) From: Stefan Monnier To: Dan Nicolaescu Cc: 4287@debbugs.gnu.org Message-ID: References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> <200908310425.n7V4PsYY019622@godzilla.ics.uci.edu> Date: Mon, 31 Aug 2009 10:49:37 -0400 In-Reply-To: <200908310425.n7V4PsYY019622@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Sun, 30 Aug 2009 21:25:54 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> >> Can you show the patch? >> > Sure: >> Sorry, too ugly to be worth the few bytes (especially since these are >> bytes you'll be using anyway as soon as you start Emacs). > How about another suggested method that is not ugly: a load-and-gc > function? Could be. The devil is in the details, so without the patch it's hard to judge. Stefan From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Reply-To: Dan Nicolaescu , 4287@debbugs.gnu.org Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Tue, 01 Sep 2009 01:00:14 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.12517666908399 (code B ref 4287); Tue, 01 Sep 2009 01:00:14 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 1 Sep 2009 00:58:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n810w8mY008387 for <4287@emacsbugs.donarmstrong.com>; Mon, 31 Aug 2009 17:58:09 -0700 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 n810vsUb014242; Mon, 31 Aug 2009 17:57:55 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n810vsRj029150; Mon, 31 Aug 2009 17:57:54 -0700 (PDT) Date: Mon, 31 Aug 2009 17:57:54 -0700 (PDT) Message-Id: <200909010057.n810vsRj029150@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Stefan Monnier Cc: 4287@debbugs.gnu.org References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> <200908310425.n7V4PsYY019622@godzilla.ics.uci.edu> In-Reply-To: (Stefan Monnier's message of "Mon, 31 Aug 2009 10:49:37 -0400") Lines: 320 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n810vsUb014242 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=0.336, required 5, autolearn=disabled, ALL_TRUSTED -1.44, FF_IHOPE_YOU_SINK 1.70, TW_FN 0.08) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu Stefan Monnier writes: > >> >> Can you show the patch? > >> > Sure: > >> Sorry, too ugly to be worth the few bytes (especially since these are > >> bytes you'll be using anyway as soon as you start Emacs). > > How about another suggested method that is not ugly: a load-and-gc > > function? > > Could be. The devil is in the details, so without the patch it's hard > to judge. Here's one. The function name can be adjusted to be more specific if needed, and the fmakunbound call is not necessarily needed... --- loadup.el.~1.180.~ 2009-08-20 23:31:53.000000000 -0700 +++ loadup.el 2009-08-31 17:55:33.000000000 -0700 @@ -56,31 +56,35 @@ (set-buffer "*scratch*") (setq buffer-undo-list t) -(load "emacs-lisp/byte-run") -(load "emacs-lisp/backquote") -(load "subr") +(defun load-and-gc (file &optional noerror nomessage nosuffix must-suffix) + (load file noerror nomessage nosuffix must-suffix) + (garbage-collect)) + +(load-and-gc "emacs-lisp/byte-run") +(load-and-gc "emacs-lisp/backquote") +(load-and-gc "subr") ;; We specify .el in case someone compiled version.el by mistake. -(load "version.el") +(load-and-gc "version.el") -(load "widget") -(load "custom") -(load "emacs-lisp/map-ynp") -(load "cus-start") -(load "international/mule") -(load "international/mule-conf.el") ;Don't get confused if someone compiled this by mistake. -(load "env") -(load "format") -(load "bindings") +(load-and-gc "widget") +(load-and-gc "custom") +(load-and-gc "emacs-lisp/map-ynp") +(load-and-gc "cus-start") +(load-and-gc "international/mule") +(load-and-gc "international/mule-conf.el") ;Don't get confused if someone compiled this by mistake. +(load-and-gc "env") +(load-and-gc "format") +(load-and-gc "bindings") (setq load-source-file-function 'load-with-code-conversion) -(load "files") +(load-and-gc "files") -(load "cus-face") -(load "faces") ; after here, `defface' may be used. -(load "minibuffer") +(load-and-gc "cus-face") +(load-and-gc "faces") ; after here, `defface' may be used. +(load-and-gc "minibuffer") -(load "button") -(load "startup") +(load-and-gc "button") +(load-and-gc "startup") (message "Lists of integers (garbage collection statistics) are normal output") (message "while building Emacs; they do not indicate a problem.") @@ -88,139 +92,139 @@ (condition-case nil ;; Don't get confused if someone compiled this by mistake. - (load "loaddefs.el") + (load-and-gc "loaddefs.el") ;; In case loaddefs hasn't been generated yet. - (file-error (load "ldefs-boot.el"))) + (file-error (load-and-gc "ldefs-boot.el"))) (message "%s" (garbage-collect)) -(load "abbrev") ;lisp-mode.el and simple.el use define-abbrev-table. -(load "simple") +(load-and-gc "abbrev") ;lisp-mode.el and simple.el use define-abbrev-table. +(load-and-gc "simple") -(load "help") +(load-and-gc "help") -(load "jka-cmpr-hook") -(load "epa-hook") +(load-and-gc "jka-cmpr-hook") +(load-and-gc "epa-hook") ;; Any Emacs Lisp source file (*.el) loaded here after can contain ;; multilingual text. -(load "international/mule-cmds") -(load "case-table") -(load "international/characters") -(load "composite") +(load-and-gc "international/mule-cmds") +(load-and-gc "case-table") +(load-and-gc "international/characters") +(load-and-gc "composite") ;; This file doesn't exist when building Emacs from CVS. It is ;; generated just after temacs is build. -(load "international/charprop.el" t) +(load-and-gc "international/charprop.el" t) ;; Load language-specific files. -(load "language/chinese") -(load "language/cyrillic") -(load "language/indian") -(load "language/sinhala") -(load "language/english") -(load "language/ethiopic") -(load "language/european") -(load "language/czech") -(load "language/slovak") -(load "language/romanian") -(load "language/greek") -(load "language/hebrew") -(load "language/japanese") -(load "language/korean") -(load "language/lao") -(load "language/tai-viet") -(load "language/thai") -(load "language/tibetan") -(load "language/vietnamese") -(load "language/misc-lang") -(load "language/utf-8-lang") -(load "language/georgian") -(load "language/khmer") -(load "language/burmese") -(load "language/cham") - -(load "indent") -(load "window") -(load "frame") -(load "term/tty-colors") -(load "font-core") +(load-and-gc "language/chinese") +(load-and-gc "language/cyrillic") +(load-and-gc "language/indian") +(load-and-gc "language/sinhala") +(load-and-gc "language/english") +(load-and-gc "language/ethiopic") +(load-and-gc "language/european") +(load-and-gc "language/czech") +(load-and-gc "language/slovak") +(load-and-gc "language/romanian") +(load-and-gc "language/greek") +(load-and-gc "language/hebrew") +(load-and-gc "language/japanese") +(load-and-gc "language/korean") +(load-and-gc "language/lao") +(load-and-gc "language/tai-viet") +(load-and-gc "language/thai") +(load-and-gc "language/tibetan") +(load-and-gc "language/vietnamese") +(load-and-gc "language/misc-lang") +(load-and-gc "language/utf-8-lang") +(load-and-gc "language/georgian") +(load-and-gc "language/khmer") +(load-and-gc "language/burmese") +(load-and-gc "language/cham") + +(load-and-gc "indent") +(load-and-gc "window") +(load-and-gc "frame") +(load-and-gc "term/tty-colors") +(load-and-gc "font-core") ;; facemenu must be loaded before font-lock, because `facemenu-keymap' ;; needs to be defined when font-lock is loaded. -(load "facemenu") -(load "emacs-lisp/syntax") -(load "font-lock") -(load "jit-lock") +(load-and-gc "facemenu") +(load-and-gc "emacs-lisp/syntax") +(load-and-gc "font-lock") +(load-and-gc "jit-lock") (if (fboundp 'track-mouse) (progn - (load "mouse") + (load-and-gc "mouse") (and (boundp 'x-toolkit-scroll-bars) - (load "scroll-bar")) - (load "select"))) -(load "emacs-lisp/timer") -(load "isearch") -(load "rfn-eshadow") + (load-and-gc "scroll-bar")) + (load-and-gc "select"))) +(load-and-gc "emacs-lisp/timer") +(load-and-gc "isearch") +(load-and-gc "rfn-eshadow") (message "%s" (garbage-collect)) -(load "menu-bar") -(load "paths.el") ;Don't get confused if someone compiled paths by mistake. -(load "emacs-lisp/lisp") -(load "textmodes/page") -(load "register") -(load "textmodes/paragraphs") -(load "emacs-lisp/lisp-mode") -(load "textmodes/text-mode") -(load "textmodes/fill") +(load-and-gc "menu-bar") +(load-and-gc "paths.el") ;Don't get confused if someone compiled paths by mistake. +(load-and-gc "emacs-lisp/lisp") +(load-and-gc "textmodes/page") +(load-and-gc "register") +(load-and-gc "textmodes/paragraphs") +(load-and-gc "emacs-lisp/lisp-mode") +(load-and-gc "textmodes/text-mode") +(load-and-gc "textmodes/fill") (message "%s" (garbage-collect)) -(load "replace") -(load "buff-menu") +(load-and-gc "replace") +(load-and-gc "buff-menu") (if (fboundp 'x-create-frame) (progn - (load "fringe") - (load "image") - (load "international/fontset") - (load "dnd") - (load "mwheel") - (load "tool-bar"))) + (load-and-gc "fringe") + (load-and-gc "image") + (load-and-gc "international/fontset") + (load-and-gc "dnd") + (load-and-gc "mwheel") + (load-and-gc "tool-bar"))) (if (featurep 'x) (progn - (load "x-dnd") - (load "term/common-win") - (load "term/x-win"))) + (load-and-gc "x-dnd") + (load-and-gc "term/common-win") + (load-and-gc "term/x-win"))) (message "%s" (garbage-collect)) (if (eq system-type 'windows-nt) (progn - (load "w32-vars") - (load "term/common-win") - (load "term/w32-win") - (load "ls-lisp") - (load "disp-table") - (load "dos-w32") - (load "w32-fns"))) + (load-and-gc "w32-vars") + (load-and-gc "term/common-win") + (load-and-gc "term/w32-win") + (load-and-gc "ls-lisp") + (load-and-gc "disp-table") + (load-and-gc "dos-w32") + (load-and-gc "w32-fns"))) (if (eq system-type 'ms-dos) (progn - (load "dos-w32") - (load "dos-fns") - (load "dos-vars") + (load-and-gc "dos-w32") + (load-and-gc "dos-fns") + (load-and-gc "dos-vars") ;; Don't load term/common-win: it isn't appropriate for the `pc' ;; ``window system'', which generally behaves like a terminal. - (load "term/pc-win") - (load "ls-lisp") - (load "disp-table"))) ; needed to setup ibm-pc char set, see internal.el + (load-and-gc "term/pc-win") + (load-and-gc "ls-lisp") + (load-and-gc "disp-table"))) ; needed to setup ibm-pc char set, see internal.el (if (featurep 'ns) (progn - (load "emacs-lisp/easymenu") ;; for platform-related menu adjustments - (load "term/ns-win"))) + (load-and-gc "emacs-lisp/easymenu") ;; for platform-related menu adjustments + (load-and-gc "term/ns-win"))) (if (fboundp 'atan) ; preload some constants and (progn ; floating pt. functions if we have float support. - (load "emacs-lisp/float-sup"))) + (load-and-gc "emacs-lisp/float-sup"))) (message "%s" (garbage-collect)) -(load "vc-hooks") -(load "ediff-hook") -(if (fboundp 'x-show-tip) (load "tooltip")) +(load-and-gc "vc-hooks") +(load-and-gc "ediff-hook") +(if (fboundp 'x-show-tip) (load-and-gc "tooltip")) (message "%s" (garbage-collect)) @@ -283,9 +287,12 @@ ;;;Note: You can cause additional libraries to be preloaded ;;;by writing a site-init.el that loads them. ;;;See also "site-load" above. -(load "site-init" t) +(load-and-gc "site-init" t) (setq current-load-list nil) +;; Unbound the function, we don't need it elsewhere. +(fmakunbound 'load-and-gc) + ;; Write the value of load-history into fns-VERSION.el, ;; then clear out load-history. ;; (if (or (equal (nth 3 command-line-args) "dump") From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect Reply-To: Juanma Barranquero , 4287@debbugs.gnu.org Resent-From: Juanma Barranquero Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Tue, 01 Sep 2009 11:50:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.12518055139915 (code B ref 4287); Tue, 01 Sep 2009 11:50:07 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 1 Sep 2009 11:45:13 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.1 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-bw0-f223.google.com (mail-bw0-f223.google.com [209.85.218.223]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n81BjADc009752 for <4287@emacsbugs.donarmstrong.com>; Tue, 1 Sep 2009 04:45:12 -0700 Received: by bwz23 with SMTP id 23so3865180bwz.1 for <4287@emacsbugs.donarmstrong.com>; Tue, 01 Sep 2009 04:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=CmHxuZeeCznzeEdZq4w+XIRVKipp+B7Hw9DlRUiOT/g=; b=vCCe3lV+IGKcSCrPx5Krs1Ka+LNhu7x5EMHFfM2k1BEDCtH/NKS9oP5lxXYjbkKCCl +VQMrRlV0qlFIf5OnlKqTQpoUb0fktoZp2MleLoZMgcRbsqKXF40CWOtc5Y1qPhyaxnn MU8Bb6WXuekOzmS2hGh/AHqE+Iw2QEjFNHtRk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=extvqXrrFS6FJDUrpQp5efuCnOFNYJ1wFm/oN6pCvu8zCO6tYyYmdAdNSH2xWmqtZh BN2G8LgbUrG3RhhOZooe9Ts2PXYHtCovacATqbun3PwyWHVHo0ITZfHfx+DrB2KqVPK3 3ZeunXuAc1ezldE8VORmd56z4orhduAFQIjb0= MIME-Version: 1.0 Received: by 10.239.183.23 with SMTP id s23mr575020hbg.56.1251805504066; Tue, 01 Sep 2009 04:45:04 -0700 (PDT) In-Reply-To: References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> From: Juanma Barranquero Date: Tue, 1 Sep 2009 13:44:44 +0200 Message-ID: To: Stefan Monnier Cc: 4287@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 On Mon, Aug 31, 2009 at 16:46, Stefan Monnier wrote: > We could replace the call from C to do-after-load-evaluation by > Frun_hooks(Qafter-load-functions), either passing it the file name > explicitly or making sure load-file-name is still set. I think this would be a worthwhile change (regardless of the chosen fix for the "load + gc" issue on startup.el). Juanma From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect Reply-To: Stefan Monnier , 4287@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Tue, 01 Sep 2009 16:30:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.125182210028274 (code B ref 4287); Tue, 01 Sep 2009 16:30:06 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 1 Sep 2009 16:21:40 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.3 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n81GLb1f028266 for <4287@emacsbugs.donarmstrong.com>; Tue, 1 Sep 2009 09:21:39 -0700 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n81GLaKb005137; Tue, 1 Sep 2009 12:21:36 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 64D623A3A5; Tue, 1 Sep 2009 12:21:36 -0400 (EDT) From: Stefan Monnier To: Juanma Barranquero Cc: 4287@debbugs.gnu.org Message-ID: References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> Date: Tue, 01 Sep 2009 12:21:36 -0400 In-Reply-To: (Juanma Barranquero's message of "Tue, 1 Sep 2009 13:44:44 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3353=0 >> We could replace the call from C to do-after-load-evaluation by >> Frun_hooks(Qafter-load-functions), either passing it the file name >> explicitly or making sure load-file-name is still set. > I think this would be a worthwhile change (regardless of the chosen > fix for the "load + gc" issue on startup.el). Patches welcome, Stefan From unknown Fri Jun 20 19:52:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4287: reducing emacs size by more frequent garbage-collect Reply-To: Juanma Barranquero , 4287@debbugs.gnu.org Resent-From: Juanma Barranquero Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Tue, 01 Sep 2009 21:35:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4287 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 4287-submit@emacsbugs.donarmstrong.com id=B4287.125184085826400 (code B ref 4287); Tue, 01 Sep 2009 21:35:04 +0000 Received: (at 4287) by emacsbugs.donarmstrong.com; 1 Sep 2009 21:34:18 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n81LYGoL026396 for <4287@emacsbugs.donarmstrong.com>; Tue, 1 Sep 2009 14:34:17 -0700 Received: by fg-out-1718.google.com with SMTP id e21so883134fga.13 for <4287@emacsbugs.donarmstrong.com>; Tue, 01 Sep 2009 14:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=sU+knNnVmJY+B5OCVGQnSQ1y6xd11zc1SQYMfbvOY90=; b=irPDJ1qAh5u50NbE6EhgiJJO1cywFV4ARtX2/OqN+PkRE0Ofw6AWp8gLPQg9eOZ/bq L2iAgxIqnB+8U08uPx3sGD6jGRUjaBjdAuZXOuZzn/VKmzMA+NsFmFy0GIi5SEKFfvMh Gbs+eqHEKzRun+sZK6mOr2VjtUPecuW+wbd3I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=rSutLQdiCLkgMzsJfcpn6Vd6tH/1zRdGvVmY4IMezptPmnBe9cY2Lu2vf/UAG15x5t yC+VZKSGiO14TRPrUwc0+MfuaSTtb2HSgAG6XvT2maYMj0ip/nbhCb3KdGmMfGsoYKRV yQpBtUQRQZTcDYq/9TwpIOYyubEeCIfbnt03Y= MIME-Version: 1.0 Received: by 10.239.179.99 with SMTP id c35mr673613hbg.161.1251840855172; Tue, 01 Sep 2009 14:34:15 -0700 (PDT) In-Reply-To: References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> From: Juanma Barranquero Date: Tue, 1 Sep 2009 23:33:55 +0200 Message-ID: To: Stefan Monnier Cc: 4287@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 On Tue, Sep 1, 2009 at 18:21, Stefan Monnier wrote: >> I think this would be a worthwhile change (regardless of the chosen >> fix for the "load + gc" issue on startup.el). > > Patches welcome, Adding after-load-functions seems easy enough, but you say "replace the call from C to do-after-load-evaluation". It is unclear to me how do you propose to run do-after-load-evaluation then. Juanma From unknown Fri Jun 20 19:52:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Dan Nicolaescu Subject: bug#4287 closed by Dan Nicolaescu (Re: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el) Message-ID: References: <200909170617.n8H6HvDs020712@godzilla.ics.uci.edu> <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> X-Emacs-PR-Message: they-closed 4287 X-Emacs-PR-Package: emacs Reply-To: 4287@debbugs.gnu.org Date: Thu, 17 Sep 2009 06:25:07 +0000 Content-Type: multipart/mixed; boundary="----------=_1253168707-16132-1" This is a multi-part message in MIME format... ------------=_1253168707-16132-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #4287: reducing emacs size by more frequent garbage-collect calls in loadup= .el It has been closed by Dan Nicolaescu . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Dan Nicolaescu by replying to this email. --=20 4287: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D4287 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1253168707-16132-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4287-done) by emacsbugs.donarmstrong.com; 17 Sep 2009 06:18:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.6 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8H6I9SE015282 for <4287-done@emacsbugs.donarmstrong.com>; Wed, 16 Sep 2009 23:18:10 -0700 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 n8H6HvDK000172 for <4287-done@emacsbugs.donarmstrong.com>; Wed, 16 Sep 2009 23:17:57 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n8H6HvDs020712; Wed, 16 Sep 2009 23:17:57 -0700 (PDT) Date: Wed, 16 Sep 2009 23:17:57 -0700 (PDT) Message-Id: <200909170617.n8H6HvDs020712@godzilla.ics.uci.edu> From: Dan Nicolaescu To: 4287-done@debbugs.gnu.org Subject: Re: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> X-Debbugs-No-Ack: yes In-Reply-To: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Sat, 29 Aug 2009 11:41:58 -0700 (PDT)") Lines: 1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n8H6HvDK000172 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu This is done in CVS now. ------------=_1253168707-16132-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 29 Aug 2009 18:43:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.2 required=4.0 tests=AWL,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 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 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 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 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 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 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) 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) Date: Sat, 29 Aug 2009 11:41:58 -0700 (PDT) Message-Id: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> From: Dan Nicolaescu To: bug-gnu-emacs Subject: reducing emacs size by more frequent garbage-collect calls in loadup.el X-Debbugs-No-Ack: yes Lines: 22 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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) 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 ------------=_1253168707-16132-1--