From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jimmy Wong Newsgroups: gmane.emacs.bugs Subject: bug#63871: 29.0.91; JIT native comp triggered to compile loaddefs repeatedly on require Date: Sat, 3 Jun 2023 15:02:18 +0100 Message-ID: <9cb1886a-7173-4d27-bac6-183069875db8@Spark> References: <83jzwk8xhn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="647b47f8_7457445f_d2d7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39622"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63871-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 03 16:03:40 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1q5Rr1-000A4X-BT for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Jun 2023 16:03:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5RqU-0002lb-L7; Sat, 03 Jun 2023 10:03:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5RqR-0002kf-Rw for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 10:03:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q5RqR-0004DX-Je for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 10:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5RqR-00040X-ED for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 10:03:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jimmy Wong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Jun 2023 14:03:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63871 X-GNU-PR-Package: emacs Original-Received: via spool by 63871-done@debbugs.gnu.org id=D63871.168580096415351 (code D ref 63871); Sat, 03 Jun 2023 14:03:03 +0000 Original-Received: (at 63871-done) by debbugs.gnu.org; 3 Jun 2023 14:02:44 +0000 Original-Received: from localhost ([127.0.0.1]:44007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5Rq7-0003zW-K7 for submit@debbugs.gnu.org; Sat, 03 Jun 2023 10:02:43 -0400 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:56455) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5Rq5-0003z7-3C for 63871-done@debbugs.gnu.org; Sat, 03 Jun 2023 10:02:42 -0400 Original-Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-3f623adec61so32078545e9.0 for <63871-done@debbugs.gnu.org>; Sat, 03 Jun 2023 07:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685800955; x=1688392955; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=BmyC2wGjtjd/VYLeXNNUb7YPQmiMFss853wFCzDtWnQ=; b=pR1pgDdJ3BC1JOcLUUCkU04A/hP0JVLyssjEdAVKoHiqBlKt6Pp1d42lRS7Y0zY2aQ UXSs94fmamCljK2LfBlSTvSOdZSFVl6umHgdJ3pmJq3qxLci4eBLOahMaXzqbrwhNx7L VjV5eHOAgYOAWl3Z4M06b9nsD03G1ONdJ2Ry5Me/9WbdRd7gVamXLcjT/vbLJy4g4Ofg aTuOcl9ZA+0GvcPbSYY4KELvYFfDcb8QavQkWD/G470Pv3e3j8bGLjAaTd3giqVuxIvx UwKtw2wadSoi3C6uEo+QwKZ7qKrBkzmBiL/5KvzCG0vVgQsBhli4nwqvX9Sc5GY8WPGm Saiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685800955; x=1688392955; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BmyC2wGjtjd/VYLeXNNUb7YPQmiMFss853wFCzDtWnQ=; b=Rb/uyE9/CGc6kJeEEU4LYWWrYAx2fo1eK+IzidpY+IQS1VhI59AUITX9wXi2Y9PrsB DlPli7A7yRQnIa8DCMDHtkR8cyMJSCj9p4c/7KEO03//D3COcCixszd5B8+fD+CZz902 H0Odgh2AoTdf5XCv/N75nlgQYvmngp1+C5WK1VxAdDPBzxWfwUaia89txCGZvcE/IsaU 7Rj9Lxt6xr/ERdrQQVR+hXAaDl11Aryv7Vo4TP3qfZ2OqyNj4IlnS98ikfJysd8FmlWy IlgZ4oAWFxR8vuN99dwMlp4XMiEyffl137zPVOVwY4acxur/JQr+gx54ryTTpU/C+hRO Lh6A== X-Gm-Message-State: AC+VfDwlZEltsTtBDUSFf1gpFfFMCav7DVb30/XVhBKtisi8Fxww5pc+ V6h/w7EMkFaBvWL8jrQMKp6OhHNeHiQ= X-Google-Smtp-Source: ACHHUZ4t1QpdlFYZC4J8AJ+7aTBzQ2V3p22WE1J9hPIm5pXUqz/ELUe/Yq6Su+7n9TFjuYPhkQyn/g== X-Received: by 2002:a1c:7312:0:b0:3f6:9634:c8d6 with SMTP id d18-20020a1c7312000000b003f69634c8d6mr4420215wmb.18.1685800954679; Sat, 03 Jun 2023 07:02:34 -0700 (PDT) Original-Received: from [2a01:4b00:89a0:2400:16:6e10:100:0] ([2a01:4b00:89a0:2400:18b7:3953:b17d:de2c]) by smtp.gmail.com with ESMTPSA id o7-20020a05600c4fc700b003f71ad792f2sm12382791wmq.1.2023.06.03.07.02.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Jun 2023 07:02:34 -0700 (PDT) In-Reply-To: <83jzwk8xhn.fsf@gnu.org> X-Readdle-Message-ID: 9cb1886a-7173-4d27-bac6-183069875db8@Spark X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262844 Archived-At: --647b47f8_7457445f_d2d7 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline The problem is this: 1. There=E2=80=99s no-native-compile:r set in the file, so a eln file was= never produced. 2. nativecomp does not know which file should not be compiled until it op= ens the file 3. Whenever a require is encountered, nativecomp can=E2=80=99t find its e= ln, doesn=E2=80=99t know it can=E2=80=99t be compiled until it reads the = file, and it can=E2=80=99t read the file until it unzips the file. 4. This unnecessary work is done every time any package requires one of t= hese packages that cannot be compiled, again and again, generating an ext= ra buffer that mess up the buffer orders in the buffer list. On 3 Jun 2023 at 2:50 PM +0100, Eli Zaretskii , wrote: > > =46rom: Jimmy Yuen Ho Wong > > Date: Sat, 03 Jun 2023 14:22:41 +0100 > > > > > > Reproduction: > > > > 1. emacs -q -nsl --eval=3D=22(require 'cl-lib)=22 > > 2. C-x b TAB > > 3. Select *Async-native-compile-log* > > 4. The following is printed > > > > =60=60=60emacs-lisp > > Compiling /opt/local/share/emacs/29.0.91/lisp/emacs-lisp/cl-loaddefs.= el.gz... > > uncompressing cl-loaddefs.el.gz... > > uncompressing cl-loaddefs.el.gz...done > > Compilation finished. > > =60=60=60 > > > > Expectation: > > > > This behavior is observed when any packages in =7E/.emacs.d/elpa/ > > autoloads and require cl-lib, org or tramp as well. > > > > The simple act of requiring a built-in Emacs package should not trigg= er > > a JIT native compilation on an Emacs installation built with > > =60--with-native-compilation=3Daot=60. > > And it doesn't. cl-loaddefs has the =22no-native-compile: t=22 thingy i= n > the file-local variables, so the native-compilation does nothing. > > So I don't see any bug here, and I'm closing this bug. --647b47f8_7457445f_d2d7 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
The problem is this:
  1. There=E2=80=99s no-native-compile:r set in the file, so a eln file wa= s never produced.
  2. nativecomp does not know which file should not be compiled until it o= pens the file
  3. Whenever a require is encountered, nativecomp can=E2=80=99t find its = eln, doesn=E2=80=99t know it can=E2=80=99t be compiled until it reads the= file, and it can=E2=80=99t read the file until it unzips the file.
  4. This unnecessary work is done every time any package requires one of = these packages that cannot be compiled, again and again, generating an ex= tra buffer that mess up the buffer orders in the buffer list.
On 3 Jun 2023 at 2:50 PM +0100, Eli= Zaretskii <eliz=40gnu.org>, wrote:
=46rom: Jimmy Yuen Ho Wong <wyuenho=40gm= ail.com>
Date: Sat, 03 Jun 2023 14:22:41 +0100


Reproduction:

1. emacs -q -nsl --eval=3D=22(require 'cl-lib)=22
2. C-x b TAB
3. Select *Async-native-compile-log*
4. The following is printed

=60=60=60emacs-lisp
Compiling /opt/local/share/emacs/29.0.91/lisp/emacs-lisp/cl-loaddefs.el.g= z...
uncompressing cl-loaddefs.el.gz...
uncompressing cl-loaddefs.el.gz...done
Compilation finished.
=60=60=60

Expectation:

This behavior is observed when any packages in =7E/.emacs.d/elpa/
autoloads and require cl-lib, org or tramp as well.

The simple act of requiring a built-in Emacs package should not trigger a JIT native compilation on an Emacs installation built with
=60--with-native-compilation=3Daot=60.

And it doesn't. cl-loaddefs has the =22no-native-compile: t=22 thingy in<= br /> the file-local variables, so the native-compilation does nothing.

So I don't see any bug here, and I'm closing this bug.
=
--647b47f8_7457445f_d2d7--