From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#4287: reducing emacs size by more frequent garbage-collect calls in loadup.el Date: Sun, 30 Aug 2009 22:45:03 +0200 Message-ID: References: <200908291841.n7TIfw4E003762@godzilla.ics.uci.edu> <200908300609.n7U69Axh009778@godzilla.ics.uci.edu> Reply-To: Juanma Barranquero , 4287@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1251666436 11765 80.91.229.12 (30 Aug 2009 21:07:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Aug 2009 21:07:16 +0000 (UTC) Cc: 4287@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 30 23:07:09 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 1MhrcC-0002Kp-Oy for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Aug 2009 23:07:09 +0200 Original-Received: from localhost ([127.0.0.1]:37469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhrcC-0002VI-6D for geb-bug-gnu-emacs@m.gmane.org; Sun, 30 Aug 2009 17:07:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mhrc7-0002Tq-Jn for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2009 17:07:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mhrc2-0002P0-W5 for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2009 17:07:03 -0400 Original-Received: from [199.232.76.173] (port=54147 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mhrc2-0002Oh-J6 for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2009 17:06:58 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:55603) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mhrc1-0001yh-R0 for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2009 17:06:58 -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 n7UL6sqA028122; Sun, 30 Aug 2009 14:06:55 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7UKo7UK024042; Sun, 30 Aug 2009 13:50:07 -0700 Resent-Date: Sun, 30 Aug 2009 13:50:07 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juanma Barranquero Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 30 Aug 2009 20:50:07 +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 4287-submit@emacsbugs.donarmstrong.com id=B4287.125166513123207 (code B ref 4287); Sun, 30 Aug 2009 20:50:07 +0000 Original-Received: (at 4287) by emacsbugs.donarmstrong.com; 30 Aug 2009 20:45:31 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-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 Original-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= Original-Received: by 10.239.130.35 with SMTP id 35mr377267hbh.31.1251665123072; Sun, 30 Aug 2009 13:45:23 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sun, 30 Aug 2009 17:07:03 -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:30666 Archived-At: 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