From b99a679a765420fa7d64e7e81e60552909bf29eb Mon Sep 17 00:00:00 2001 From: Rahul Martim Juliato Date: Sun, 15 Feb 2026 17:19:17 -0300 Subject: [PATCH] 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. --- README.md | 12 ++++++------ init.el | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ac62353..abef475 100644 --- a/README.md +++ b/README.md @@ -137,12 +137,12 @@ configuration. grammars and download some fonts. This configuration uses **Nerd Fonts** by default, so installing them now is highly recommended for the best experience. -**VERY IMPORTANT**: On first launch, Emacs will also **native compile some -external packages**, which may take a little time. Additionally, the first time -you perform certain actions, like opening the tree explorer, Emacs may compile -related components in the background. This is completely normal and only -happens once per feature. You might notice a brief moment of sluggish -performance during this initial compilation. +**VERY IMPORTANT**: On first launch, Emacs will **byte-compile** some external +packages, which may take a little time. This is completely normal and only +happens once. Subsequent launches will be fast. Note that JIT native compilation +is disabled by default in this config to avoid confusing background compilation. +If you want extra performance, see the comments around `native-comp-jit-compilation` +in `init.el` on how to enable it. 3. **Set terminal mode by default**: diff --git a/init.el b/init.el index 649bf8b..016b09d 100644 --- a/init.el +++ b/init.el @@ -1,7 +1,7 @@ ;;; init.el --- Emacs-Kick --- A feature rich Emacs config for (neo)vi(m)mers -*- lexical-binding: t; -*- ;; Author: Rahul Martim Juliato -;; Version: 0.3.3 +;; Version: 0.3.4 ;; Package-Requires: ((emacs "30.1")) ;; License: GPL-2.0-or-later @@ -105,6 +105,20 @@ ;; Set the maximum output size for reading process output, allowing for larger data transfers. (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? ;; Well, this config launches Emacs in about ~0.3 seconds, ;; which, in modern terms, is a miracle considering how fast it starts