emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Turning on savehist-mode by default


From: Adam Porter
Subject: Re: Turning on savehist-mode by default
Date: Tue, 28 Nov 2023 15:07:46 -0600
User-agent: Mozilla Thunderbird

FWIW, IME, it may not be a good idea to enable savehist-mode by default. As an example, see this issue report on Ement.el's repository:

https://github.com/alphapapa/ement.el/issues/216

The gist is that, for users who enabled savehist, it was saving the variable command-history, which included some complex commands whose arguments (from interactive completion) included large data structures (which are hidden from the user when called interactively). This resulted in savehist files hundreds of MB in size and very noticeable pauses whenever savehist saved its data, from timers and upon Emacs exit.

The worst part was how long it took to discover the source of the problem. There were intermittent reports of weird pauses for months, without any discernible reason, until a user finally narrowed it down to using savehist. Then we had to add this hacky workaround in Ement to try to automatically avoid the problem.

Such cases may be rare (or not--I can't say), but when it happens, it seems to be a bear to deal with, being very unintuitive. For myself, even having written a number of Emacs packages, I wasn't yet aware of the command-history variable and how it saves arguments, and certainly not the implications of using savehist as well.

--Adam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]