bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#36877: 25.3; uniquify renaway uniquify-managed list


From: Noam Postavsky
Subject: bug#36877: 25.3; uniquify renaway uniquify-managed list
Date: Thu, 08 Aug 2019 20:47:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux)

David Biesack <David.Biesack@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)





reply via email to

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