unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Noam Postavsky <npostavs@gmail.com>, 15112@debbugs.gnu.org
Subject: bug#15112: 24.3; package.el byte compile autoloads
Date: Thu, 26 Nov 2020 05:18:36 -0500	[thread overview]
Message-ID: <CADwFkmk_tz0yU95jf7Ceou_Mftxd5g8CNq6cybe+fXEs5agRXw@mail.gmail.com> (raw)
In-Reply-To: <87im9s8nrz.fsf@gmx.de>

Hi Michael,

Michael Albinus <michael.albinus@gmx.de> writes:

>> I made a little experiment and of course byte-compiling these files
>> gives us a ton of headaches, see below.  So I'm not sure this is all
>> worth it.  Do we have reason to believe that byte-compiling these files
>> would give any significant performance increase?
>>
>>   ELC      net/tramp-loaddefs.elc
>
> I don't know which kind of experiment you have applied, so I cannot say
> anything about the compilation errors. However, I wonder where paths
> like "net/tramp-loaddefs.elc" come from. We're speaking about
> package.el, meaning we're speaking about ELPA. Tramp in ELPA doesn't use
> any subdirectory "net".

I used this patch:

diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 07bda537b3..e32d74fa7c 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -373,7 +373,7 @@ autoload-rubric
 	    ";;; Code:\n\n"
 	    (if lp
 		"(add-to-list 'load-path (directory-file-name
-                         (or (file-name-directory #$) (car load-path))))\n\n")
+                         (or (file-name-directory load-file-name)
(car load-path))))\n\n")
 	    "\f\n"
 	    ;; This is used outside of autoload.el, eg cus-dep, finder.
 	    (if feature
@@ -382,7 +382,6 @@ autoload-rubric
 			  (file-name-sans-extension basename))))
 	    ";; Local Variables:\n"
 	    ";; version-control: never\n"
-            ";; no-byte-compile: t\n" ;; #$ is byte-compiled into nil.
 	    ";; no-update-autoloads: t\n"
 	    ";; coding: utf-8\n"
 	    ";; End:\n"

And ran "make bootstrap".

> Anyway, I don't believe we'll see a performance boost after
> byte-compiling loaddef files. They just contain function and variable
> declarations, no implementation (but the initial values of variables).
>
> There are exceptions like in tramp-loaddefs.el, but they still don't
> count wrt performance, I believe.

This would be my guess too.  It seems like more trouble than it's worth.





  reply	other threads:[~2020-11-26 10:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-17  1:04 bug#15112: 24.3; package.el byte compile autoloads Kevin Ryde
2019-08-28 13:15 ` Stefan Kangas
2019-08-28 14:48   ` Noam Postavsky
2020-11-26  2:44     ` Stefan Kangas
2020-11-26  9:34       ` Michael Albinus
2020-11-26 10:18         ` Stefan Kangas [this message]
2020-11-26 11:53           ` Michael Albinus
2021-01-01 18:56             ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmk_tz0yU95jf7Ceou_Mftxd5g8CNq6cybe+fXEs5agRXw@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=15112@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=npostavs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).