From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <83pq98u3h8.fsf@gnu.org> <83y5nvswfs.fsf@gnu.org> <83y5ntzt5v.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1340210037 25037 80.91.229.3 (20 Jun 2012 16:33:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 20 Jun 2012 16:33:57 +0000 (UTC) Cc: 11657@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 20 18:33:55 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ShNqm-0005kh-Gd for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jun 2012 18:33:48 +0200 Original-Received: from localhost ([::1]:37981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShNqm-0003kE-Gw for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jun 2012 12:33:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShNqf-0003jO-1s for bug-gnu-emacs@gnu.org; Wed, 20 Jun 2012 12:33:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShNqY-0001Cu-Ot for bug-gnu-emacs@gnu.org; Wed, 20 Jun 2012 12:33:40 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShNqY-0001Cn-L5 for bug-gnu-emacs@gnu.org; Wed, 20 Jun 2012 12:33:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1ShNtu-0000pX-3W for bug-gnu-emacs@gnu.org; Wed, 20 Jun 2012 12:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Jun 2012 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11657 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11657-submit@debbugs.gnu.org id=B11657.13402101983160 (code B ref 11657); Wed, 20 Jun 2012 16:37:02 +0000 Original-Received: (at 11657) by debbugs.gnu.org; 20 Jun 2012 16:36:38 +0000 Original-Received: from localhost ([127.0.0.1]:50067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ShNtV-0000ou-NV for submit@debbugs.gnu.org; Wed, 20 Jun 2012 12:36:37 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:49415) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ShNtT-0000on-Tc for 11657@debbugs.gnu.org; Wed, 20 Jun 2012 12:36:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCrYj/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOWKo0JgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="191787750" Original-Received: from 76-10-182-35.dsl.teksavvy.com (HELO pastel.home) ([76.10.182.35]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Jun 2012 12:33:07 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 2C1F359086; Wed, 20 Jun 2012 12:33:06 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Thu, 14 Jun 2012 15:09:12 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61144 Archived-At: > 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")