Skip to content

Commit b99a679

Browse files
committed
feat: disable JIT native compilation by default
Newcomers may find background JIT compilation confusing as it causes unpredictable sluggishness. Disable it by default and add comments guiding users on how to re-enable it for extra performance. Update README to reflect the new behavior.
1 parent ae87471 commit b99a679

2 files changed

Lines changed: 21 additions & 7 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ configuration.
137137
grammars and download some fonts. This configuration uses **Nerd Fonts** by
138138
default, so installing them now is highly recommended for the best experience.
139139

140-
**VERY IMPORTANT**: On first launch, Emacs will also **native compile some
141-
external packages**, which may take a little time. Additionally, the first time
142-
you perform certain actions, like opening the tree explorer, Emacs may compile
143-
related components in the background. This is completely normal and only
144-
happens once per feature. You might notice a brief moment of sluggish
145-
performance during this initial compilation.
140+
**VERY IMPORTANT**: On first launch, Emacs will **byte-compile** some external
141+
packages, which may take a little time. This is completely normal and only
142+
happens once. Subsequent launches will be fast. Note that JIT native compilation
143+
is disabled by default in this config to avoid confusing background compilation.
144+
If you want extra performance, see the comments around `native-comp-jit-compilation`
145+
in `init.el` on how to enable it.
146146

147147
3. **Set terminal mode by default**:
148148

init.el

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
;;; init.el --- Emacs-Kick --- A feature rich Emacs config for (neo)vi(m)mers -*- lexical-binding: t; -*-
22
;; Author: Rahul Martim Juliato
33

4-
;; Version: 0.3.3
4+
;; Version: 0.3.4
55
;; Package-Requires: ((emacs "30.1"))
66
;; License: GPL-2.0-or-later
77

@@ -105,6 +105,20 @@
105105
;; Set the maximum output size for reading process output, allowing for larger data transfers.
106106
(setq read-process-output-max (* 1024 1024 4))
107107

108+
;; Disable JIT native compilation during normal usage.
109+
;; All native compilation is handled upfront during installation
110+
;; (e.g., via `ek-reinstall.sh' or `ek/first-install').
111+
;; This prevents Emacs from compiling packages in the background
112+
;; while you're working, which can cause occasional stutters.
113+
(setq native-comp-jit-compilation nil)
114+
;; If you find Emacs slow for your usage, JIT native compilation increases
115+
;; performance dramatically. Its default behavior, however, can be confusing
116+
;; for newcomers since it compiles things in the background unpredictably.
117+
;; To enable it, change the value above to `t'. After that, every time you
118+
;; first use a feature, JIT will compile it in the background, so expect
119+
;; things to be sluggish for a bit. Once everything is compiled, it's
120+
;; speed all the way.
121+
108122
;; Do I really need a speedy startup?
109123
;; Well, this config launches Emacs in about ~0.3 seconds,
110124
;; which, in modern terms, is a miracle considering how fast it starts

0 commit comments

Comments
 (0)