Disable tty-run-terminal-initialization
This code *may* have side-effects, but it does reduce startup time for terminal users by a significant margin. In my case it reduced from 2.6s to 0.4s.
This commit is contained in:
parent
5ecf206681
commit
29b383d900
1 changed files with 9 additions and 0 deletions
|
@ -273,6 +273,15 @@ users).")
|
|||
gcmh-verbose doom-debug-mode)
|
||||
(add-hook 'focus-out-hook #'gcmh-idle-garbage-collect)))
|
||||
|
||||
;; HACK `tty-run-terminal-initialization' is *tremendously* slow. Disabling it
|
||||
;; completely could have side-effects, so we defer it until later.
|
||||
(unless (display-graphic-p)
|
||||
(advice-add #'tty-run-terminal-initialization :override #'ignore)
|
||||
(add-transient-hook! 'pre-command-hook
|
||||
(advice-remove #'tty-run-terminal-initialization #'ignore)
|
||||
(dolist (frame (frame-list))
|
||||
(tty-run-terminal-initialization frame nil t))))
|
||||
|
||||
|
||||
;;
|
||||
;;; MODE-local-vars-hook
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue