Optimize configuration reload to prevent UI freezing

Implemented non-blocking reload mechanism that processes files
incrementally during idle time to prevent Emacs from freezing.

Changes:
- New default reload-emacs-config: Non-blocking with idle timers
- reload-emacs-config-blocking: Original blocking version
- reload-emacs-config-fast: Uses byte-compiled files for speed
- reload-emacs-config-smart: Only reloads recently changed files
- reload-current-file: Quick reload of current .el file only

Keybindings:
- C-c C-r: Non-blocking reload (new default)
- C-u C-c C-r: Blocking reload (old behavior)
- C-c r: Reload current file
- C-c R: Fast byte-compiled reload

This fixes the lag issue during configuration reload by loading
files one at a time with 0.01s idle gaps between them.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jens Luedicke
2025-09-10 14:59:43 +02:00
parent 54d6fd3cce
commit 8644b5c469
3 changed files with 192 additions and 6 deletions

View File

@@ -10,10 +10,20 @@ This is a modular Emacs configuration with 33+ configuration modules in the `lis
### Configuration Management
```elisp
M-x reload-emacs-config ; Reload entire configuration
M-x byte-compile-config ; Byte-compile all config files for faster loading
M-x clean-byte-compiled-files ; Remove all .elc files
M-x byte-compile-init-files ; Compile only lisp/ directory files
M-x reload-emacs-config ; Non-blocking reload (won't freeze UI)
M-x reload-emacs-config-blocking ; Original blocking reload
M-x reload-emacs-config-fast ; Fast reload using byte-compiled files
M-x reload-emacs-config-smart ; Smart reload (only changed files)
M-x reload-current-file ; Reload only current .el file
M-x byte-compile-config ; Byte-compile all config files for faster loading
M-x clean-byte-compiled-files ; Remove all .elc files
M-x byte-compile-init-files ; Compile only lisp/ directory files
;; Keybindings:
C-c C-r ; Non-blocking reload (default)
C-u C-c C-r ; Blocking reload (old behavior)
C-c r ; Reload current file only
C-c R ; Fast reload (byte-compiled)
```
### Emergency Fixes