[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Slow redisplay
From: |
Eli Zaretskii |
Subject: |
Re: Slow redisplay |
Date: |
Mon, 26 Aug 2019 10:42:57 +0300 |
> Date: Mon, 26 Aug 2019 06:20:41 +0200
> From: Ergus <spacibba@aol.com>
> Cc: help-gnu-emacs@gnu.org
>
> >If you set garbage-collection-messages non-nil, do you see any GC
> >messages when Emacs is lagging input?
>
> No there is not any garbage collection message after 5 hours.
>
> >If so, does invoking "M-x
> >garbage-collect RET" manual fix that?
> >
> Yes, executing it manually fixes the lagging.
>
> In my config I do.
>
> early-init.el
> =============
>
> (setq file-name-handler-alist nil
> message-log-max 16384
> gc-cons-threshold most-positive-fixnum ;; Defer Garbage collection
> gc-cons-percentage 1.0)
>
> (add-hook 'window-setup-hook
> (lambda ()
> (setq file-name-handler-alist file-name-handler-alist-old
> gc-cons-threshold 800000
> gc-cons-percentage 0.1)
> (garbage-collect)
> (message "Load time %.06f" (float-time (time-since my/start-time))))
> t)
>
> init.el
> =======
>
> (defun my/minibuffer-setup-hook ()
> (setq gc-cons-threshold most-positive-fixnum))
>
> (defun my/minibuffer-exit-hook ()
> (setq gc-cons-threshold 800000))
>
> (add-hook 'minibuffer-setup-hook #'my/minibuffer-setup-hook)
> (add-hook 'minibuffer-exit-hook #'my/minibuffer-exit-hook)
>
> ================
There's currently an unfixed bug on master, whereby you must call
garbage-collect explicitly when you reset gc-cons-threshold to a value
lower than most-positive-fixnum. Otherwise GC remains disabled
basically forever.