bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11657: 24.1.50; Byte compiler is a lot slower now, when run interpre


From: Stefan Monnier
Subject: bug#11657: 24.1.50; Byte compiler is a lot slower now, when run interpreted
Date: Wed, 20 Jun 2012 12:33:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> I think I see another cause for slowdown: macroexp now ends up preloaded
> in bootstrap-emacs, so byte-compiling it from COMPILE_FIRST is
> ineffective (BTW, we can remove subr.el from makefile-w32.in's
> COMPILE_FIRST, since it's useless there).

Do you still see the much slower compilation with bootstrap-emacs?
I guess you do, if so, please try the patch below and tell me if it
helps,


        Stefan


=== modified file 'lisp/loadup.el'
--- lisp/loadup.el      2012-06-13 13:18:59 +0000
+++ lisp/loadup.el      2012-06-20 16:23:57 +0000
@@ -252,6 +252,20 @@
 ;For other systems, you must edit ../src/Makefile.in.
 (load "site-load" t)
 
+;; src/boostrap-emacs is mostly used to compile .el files, so it needs
+;; macroexp, bytecomp, cconv, and byte-opt to be fast.  Generally this is done
+;; by compiling those files first, but this only makes a difference if those
+;; files are not preloaded.  As it so happens, macroexp.el tends to be
+;; accidentally preloaded in src/boostrap-emacs because cl.el and cl-macs.el
+;; require it.  So lets unload it here, if needed, to make sure the
+;; byte-compiled versions is used.
+(if (or (not (fboundp 'macroexpand-all))
+        (byte-code-function-p (symbol-function 'macroexpand-all)))
+    nil
+  (fmakunbound 'macroexpand-all)
+  (setq features (delq 'macroexp features))
+  (autoload 'macroexpand-all "macroexp"))
+
 ;; Determine which last version number to use
 ;; based on the executables that now exist.
 (if (and (or (equal (nth 3 command-line-args) "dump")









reply via email to

[Prev in Thread] Current Thread [Next in Thread]