unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30943: save-hist creates massive cache file
@ 2018-03-25 19:11 Chris Findeisen
  2018-03-26 14:59 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Chris Findeisen @ 2018-03-25 19:11 UTC (permalink / raw)
  To: 30943

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

save-hist-additional-variables never get truncated by save-hist, leading
to a massive cache file and slowdown. Practically, this matters when the
cache file silently grows to 1/2 a GB, and emacs begins randomly freezing.

history-length is supposed to keep a limit on the max history for
save-hist-additional-variables, but it doesn't.

In the savehist-save function:

(dolist (symbol savehist-minibuffer-history-variables)
          (when (and (boundp symbol)
                     (not (memq symbol savehist-ignored-variables)))
            (let ((value (savehist-trim-history (symbol-value symbol)))
      ;;....
  ))))

(dolist (symbol savehist-additional-variables)
  (when (boundp symbol)
    (let ((value (symbol-value symbol)))
    (when (savehist-printable value)
    ;; ...
    ))))

As you can see, the save-hist-trim-history fn is not called in the
second code block.

[-- Attachment #2: Type: text/html, Size: 16919 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-02-15 10:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-25 19:11 bug#30943: save-hist creates massive cache file Chris Findeisen
2018-03-26 14:59 ` Eli Zaretskii
2018-03-27  2:50   ` Chris Findeisen
2018-03-27 19:44     ` Glenn Morris
2018-03-29 16:27       ` Chris Findeisen
2018-03-29 17:09         ` Eli Zaretskii
2018-03-29 18:08         ` Glenn Morris
2018-03-29 18:47           ` Eli Zaretskii
2018-03-30  5:25             ` Glenn Morris
2018-03-30  8:14               ` Eli Zaretskii
2022-02-15 10:29           ` Lars Ingebrigtsen
2018-03-27 19:12   ` Glenn Morris
2018-03-29 10:49     ` Eli Zaretskii
2018-03-29 17:12       ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).