GNU bug report logs -
#36877
25.3; uniquify renaway uniquify-managed list
Previous Next
Reported by: David Biesack <David.Biesack <at> Apiture.com>
Date: Wed, 31 Jul 2019 16:08:04 UTC
Severity: normal
Tags: fixed, patch
Found in version 25.3
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 36877 <at> debbugs.gnu.org (full text, mbox):
David Biesack <David.Biesack <at> Apiture.com> writes:
> The list uniquified-managed sometimes starts to grow in an unmanaged manner (I suspect exponentially) after running
> Emacs for a few days. My work involves heavily editing many files named "openapi.yaml" in about 20 different
> directories, often switching git branches so I need to revisit (M-x revert-buffer) these files a lot.
>
> After a few days, I noticed opening new openapi.yaml files started to slow down dramatically - there would be several
> seconds of delay, then tens of seconds. I narrowed this to uniquify. In my buffers, the local variable
> uniquified-managed is more than 100,000 items long, with many duplicate items.
Looks like the only place where uniquified-managed is set to non-nil is
by uniquify-rationalize, so could you run with the advice below and post
the backtrace you get with it?
(defconst bug-36877-dup-table (make-hash-table :test 'eq))
(defun bug-36877-debug-fix-list-dups (fix-list)
(clrhash bug-36877-dup-table)
(dolist (item fix-list)
(let ((buf (uniquify-item-buffer item)))
(if (gethash buf bug-36877-dup-table)
(progn (debug nil "Adding duplicate to uniquify list!" item)
;; Just once.
(advice-remove 'uniquify-rationalize
#'bug-36877-debug-fix-list-dups))
(puthash buf item bug-36877-dup-table)))))
(advice-add 'uniquify-rationalize :before #'bug-36877-debug-fix-list-dups)
This bug report was last modified 4 years and 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.