Emacs keeping running async compilation

What happened?

When I open Emacs, at some point soon after a new process is spawned which seems to be asynchronously compiling something to do with lsp:

/usr/local/bin/emacs --no-comp-spawn -Q --batch --eval (setq w32-disable-abort-dialog t) -l /tmp/emacs-async-comp-lsp-protocol-720UGX.el

This slows down my Emacs session.

I’ve seen other asynchronous compilations happening in the background, but they finish and don’t happen again.

What did you expect to happen?

The compilation should finish and not keep reoccurring. Is this a bug? How can I stop this async compilation?

System information

I built Emacs 29.1 from source with the following flags: $ ./configure --with-native-compilation=aot --with-json. I have this in my config.el: (setq package-native-compile t).


Loading data dump...

Hi,

this thread is one year old but I think I am affected by something very similar, see the Github issue I opened recently:

I have a number of Emacs packages that on every startup get recompiled:

Compiling /usr/share/emacs/29.4/lisp/emacs-lisp/subr-x.el.gz...
Compiling /usr/share/emacs/29.4/lisp/emacs-lisp/pcase.el.gz...
Compiling /usr/share/emacs/29.4/lisp/emacs-lisp/gv.el.gz...
Compiling /usr/share/emacs/29.4/lisp/emacs-lisp/cl-lib.el.gz...
Compiling /usr/share/emacs/29.4/lisp/emacs-lisp/cl-loaddefs.el.gz...
Compiling /usr/share/emacs/29.4/lisp/emacs-lisp/cl-macs.el.gz...
Compiling /usr/share/emacs/29.4/lisp/emacs-lisp/cl-seq.el.gz...
Compiling /usr/share/emacs/29.4/lisp/net/tramp-loaddefs.el.gz...

I am now running Emacs 29.4 and a recent Doom checkout:

$ doom version
GNU Emacs     v29.4            nil
Doom core     v3.0.0-pre       HEAD -> master 21a427c3 2024-07-06 21:18:34 -0400
Doom modules  v24.08.0-pre     HEAD -> master 21a427c3 2024-07-06 21:18:34 -0400

I don’t have set package-native-compile (which is nil by default) but Emacs is compiled with --with-native-compilation.

When looking with top(1) at what happens during this recompilation I see processes like these:

emacs -no-comp-spawn -Q --eval (setq w32-disable-abort-dialog t) -l ~/.doom/.local/cache/comp/emacs-async-comp-*.el

Are you still experiencing this? I am trying to get to the bottom of it but I still don’t have clear the machinery under the hood and who (Emacs? Doom?) is responsible for this constant bytecode recompilation trigger. Running Emacs vanilla does not trigger the bytecode recompilation.

Thanks for any input.

This topic was automatically closed after 360 days. New replies are no longer allowed.