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: Sat, 16 Dec 2023 23:42:15 -0600
User-agent: Mozilla Thunderbird

In addition to what Po said, I'd like to gently reiterate what I said earlier in this thread: Given my experience with savehist causing unexpected and hard-to-debug performance problems[0], I'd guess that there are more such cases in the wild waiting to be triggered. If, e.g. Emacs 30.1 enabled it by default, I can imagine a number of users suddenly encountering weird pauses, and they'd probably blame GC initially[1].

As well, I have some concerns about savehist's having the potential to cause weird bugs in other libraries: The savehist-save function seems to comment out individual elements of savehist-minibuffer-history-variables that it determines are unreadable. That's understandable from its perspective, but what effect will that have on libraries that may not be expecting for their data structures to have certain parts disappear after restarting Emacs? I can just imagine the bug reports from users showing apparently corrupted or elided data structures, and having no clue as to what is mutating them, because the code isn't within the library having a bug reported against it.

IMHO, a feature like this is indeed expected and overdue in Emacs, but I don't think savehist is a good way to enable it, given its current implementation. ISTM that something built on top of the new multisession library would be more appropriate and (at least, have the potential to be) more robust.

If savehist is to be used for this, I would at least recommend taking a release cycle to publicly ask users to enable it by default and report the results, and wait for at least a few hundred positive reports before enabling it by default. Otherwise, I would expect not-insignificant fallout, IMHO.

Thanks,
Adam

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

1: Which may, in fact, be part of the problem, considering how savehist-save works: it prints a Lisp object to a buffer, then tries to read it to determine whether it's readable--doesn't that generate garbage? Now consider doing that every 1-5 minutes and upon exit.



reply via email to

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