Expand early-init.el, manual gcmh, remove nativecomp warnings
This commit is contained in:
parent
5320a92630
commit
7a6a0eb0c0
|
@ -1,5 +1,22 @@
|
||||||
;;; EMACS early-init file -*- lexical-binding:t -*-
|
;;; EMACS early-init file -*- lexical-binding:t -*-
|
||||||
|
|
||||||
|
;; Manual implementation of gcmh as soon as possible (stolen from lambda emacs)
|
||||||
|
(setq gc-cons-threshold (* 300 1024 1024)) ; 300 MB
|
||||||
|
(defmacro k-time (&rest body)
|
||||||
|
"Measure and return the time it takes evaluating BODY."
|
||||||
|
`(let ((time (current-time)))
|
||||||
|
,@body
|
||||||
|
(float-time (time-since time))))
|
||||||
|
;; 15 sec gc loop when idle
|
||||||
|
(run-with-idle-timer 15 t
|
||||||
|
(lambda ()
|
||||||
|
(let ((inhibit-message t))
|
||||||
|
(message "Garbage Collector ran for %.06fsec"
|
||||||
|
(k-time (garbage-collect))))))
|
||||||
|
|
||||||
;; Set frame parameters early
|
;; Set frame parameters early
|
||||||
(setq default-frame-alist '((font . "JetbrainsMono Nerd Font-10.5")
|
(setq default-frame-alist '((font . "JetbrainsMono Nerd Font-10.5")
|
||||||
(alpha-background . 0.94)))
|
(alpha-background . 0.94)))
|
||||||
|
|
||||||
|
;; Annoyoing comp errors
|
||||||
|
(setq native-comp-async-report-warnings-errors 'silent)
|
||||||
|
|
5
init.el
5
init.el
|
@ -10,11 +10,6 @@
|
||||||
use-package-expand-minimally t)
|
use-package-expand-minimally t)
|
||||||
(require 'use-package)
|
(require 'use-package)
|
||||||
|
|
||||||
(use-package gcmh
|
|
||||||
:demand t
|
|
||||||
:config
|
|
||||||
(gcmh-mode))
|
|
||||||
|
|
||||||
(let ((emacs-tmp-dir (expand-file-name (format "emacs%d" (user-uid))
|
(let ((emacs-tmp-dir (expand-file-name (format "emacs%d" (user-uid))
|
||||||
temporary-file-directory)))
|
temporary-file-directory)))
|
||||||
(setq auto-save-file-name-transforms `((".*" ,emacs-tmp-dir t))
|
(setq auto-save-file-name-transforms `((".*" ,emacs-tmp-dir t))
|
||||||
|
|
Loading…
Reference in a new issue