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.
This commit is contained in:
Rahul Martim Juliato
2026-02-15 17:19:17 -03:00
parent ae874711be
commit b99a679a76
2 changed files with 21 additions and 7 deletions

View File

@@ -137,12 +137,12 @@ configuration.
grammars and download some fonts. This configuration uses **Nerd Fonts** by grammars and download some fonts. This configuration uses **Nerd Fonts** by
default, so installing them now is highly recommended for the best experience. default, so installing them now is highly recommended for the best experience.
**VERY IMPORTANT**: On first launch, Emacs will also **native compile some **VERY IMPORTANT**: On first launch, Emacs will **byte-compile** some external
external packages**, which may take a little time. Additionally, the first time packages, which may take a little time. This is completely normal and only
you perform certain actions, like opening the tree explorer, Emacs may compile happens once. Subsequent launches will be fast. Note that JIT native compilation
related components in the background. This is completely normal and only is disabled by default in this config to avoid confusing background compilation.
happens once per feature. You might notice a brief moment of sluggish If you want extra performance, see the comments around `native-comp-jit-compilation`
performance during this initial compilation. in `init.el` on how to enable it.
3. **Set terminal mode by default**: 3. **Set terminal mode by default**:

16
init.el
View File

@@ -1,7 +1,7 @@
;;; init.el --- Emacs-Kick --- A feature rich Emacs config for (neo)vi(m)mers -*- lexical-binding: t; -*- ;;; init.el --- Emacs-Kick --- A feature rich Emacs config for (neo)vi(m)mers -*- lexical-binding: t; -*-
;; Author: Rahul Martim Juliato ;; Author: Rahul Martim Juliato
;; Version: 0.3.3 ;; Version: 0.3.4
;; Package-Requires: ((emacs "30.1")) ;; Package-Requires: ((emacs "30.1"))
;; License: GPL-2.0-or-later ;; License: GPL-2.0-or-later
@@ -105,6 +105,20 @@
;; Set the maximum output size for reading process output, allowing for larger data transfers. ;; Set the maximum output size for reading process output, allowing for larger data transfers.
(setq read-process-output-max (* 1024 1024 4)) (setq read-process-output-max (* 1024 1024 4))
;; Disable JIT native compilation during normal usage.
;; All native compilation is handled upfront during installation
;; (e.g., via `ek-reinstall.sh' or `ek/first-install').
;; This prevents Emacs from compiling packages in the background
;; while you're working, which can cause occasional stutters.
(setq native-comp-jit-compilation nil)
;; If you find Emacs slow for your usage, JIT native compilation increases
;; performance dramatically. Its default behavior, however, can be confusing
;; for newcomers since it compiles things in the background unpredictably.
;; To enable it, change the value above to `t'. After that, every time you
;; first use a feature, JIT will compile it in the background, so expect
;; things to be sluggish for a bit. Once everything is compiled, it's
;; speed all the way.
;; Do I really need a speedy startup? ;; Do I really need a speedy startup?
;; Well, this config launches Emacs in about ~0.3 seconds, ;; Well, this config launches Emacs in about ~0.3 seconds,
;; which, in modern terms, is a miracle considering how fast it starts ;; which, in modern terms, is a miracle considering how fast it starts