From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Speeding up the bootstrap build - a quick hack. Date: Tue, 18 Jan 2022 20:27:06 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40245"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 18 21:29:01 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9v6D-000ALq-DG for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Jan 2022 21:29:01 +0100 Original-Received: from localhost ([::1]:41976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9v6C-0006De-9E for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Jan 2022 15:29:00 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9v5N-0005KY-OQ for emacs-devel@gnu.org; Tue, 18 Jan 2022 15:28:11 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:33333 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1n9v5J-0001ZJ-PO for emacs-devel@gnu.org; Tue, 18 Jan 2022 15:28:08 -0500 Original-Received: (qmail 60582 invoked by uid 3782); 18 Jan 2022 20:27:06 -0000 Original-Received: from acm.muc.de (p4fe158ed.dip0.t-ipconnect.de [79.225.88.237]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 18 Jan 2022 21:27:06 +0100 Original-Received: (qmail 22621 invoked by uid 1000); 18 Jan 2022 20:27:06 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:284948 Archived-At: Hello, Stefan. On Tue, Jan 18, 2022 at 08:14:06 -0500, Stefan Monnier wrote: > >> > -.PHONY: compile-first compile-main compile compile-always > >> > +.PHONY: compile-zeroth compile-first compile-main compile compile-always > >> > -compile-first: $(COMPILE_FIRST) > >> > +compile-zeroth: $(COMPILE_ZEROTH) > >> > +compile-first: compile-zeroth $(COMPILE_FIRST) > >> Is this necessary, or is it just helpful to debug the Makefile? > > I'm not sure. I'm a little confused, still. It seems to be necessary. At any rate, changing the mix slightly gave rise to unwanted results. In particular... > At least I can't see why `compile-first` should need to depend on > `compile-zeroth` since the > %.elc: %.el $(COMPILE_ZEROTH) If I change that line to %.elc: %.el compile-zeroth , then Emacs builds, but redundantly ELC's all the .el files which are preloaded, taking 15 seconds longer to do so. I don't understand why this happens. Even more notably, if I eliminate compile-zeroth, putting in instead $(COMPILE_ZEROTH) everywhere needed, then make creates and deletes the ..elc0 files four times, and also redundantly runs ELC on the preloaded ..el files, despite them already being .eln's. This run took 2½ minutes longer than expected, too. I don't understand why all that happened, either. > rule should already give the same result. > So I'd suggest you drop this part of the patch and see if that causes > any kind of trouble. As above, it caused all sorts of trouble. > > +ifeq ($(HAVE_NATIVE_COMP),yes) > > +COMPILE_ZEROTH = $(COMPILE_FIRST:.elc=.elc0) > > +endif > I think we can drop the `ifeq` test here. I'll need to check the file will work with native compilation disabled. > As for eyeballing: LGTM, thank you. Thanks! > Stefan -- Alan Mackenzie (Nuremberg, Germany).