GNU bug report logs - #4287
reducing emacs size by more frequent garbage-collect calls in loadup.el

Previous Next

Package: emacs;

Reported by: Dan Nicolaescu <dann <at> ics.uci.edu>

Date: Sat, 29 Aug 2009 18:45:05 UTC

Severity: normal

Done: Dan Nicolaescu <dann <at> ics.uci.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 4287 <at> debbugs.gnu.org
Subject: bug#4287: reducing emacs size by more frequent garbage-collect  calls in loadup.el
Date: Sun, 30 Aug 2009 22:45:03 +0200
On Sun, Aug 30, 2009 at 22:04, Stefan Monnier<monnier <at> iro.umontreal.ca> 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



This bug report was last modified 15 years and 252 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.