From: Noam Postavsky <npostavs@gmail.com>
To: David Biesack <David.Biesack@Apiture.com>
Cc: 36877@debbugs.gnu.org
Subject: bug#36877: 25.3; uniquify renaway uniquify-managed list
Date: Thu, 08 Aug 2019 20:47:31 -0400 [thread overview]
Message-ID: <87imr7qi58.fsf@gmail.com> (raw)
In-Reply-To: <183FDF33-F082-4E2F-BC62-6156A83FFADD@apiture.com> (David Biesack's message of "Wed, 31 Jul 2019 16:04:56 +0000")
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)
next prev parent reply other threads:[~2019-08-09 0:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-31 16:04 bug#36877: 25.3; uniquify renaway uniquify-managed list David Biesack
2019-08-09 0:47 ` Noam Postavsky [this message]
2019-08-09 15:58 ` David Biesack
2019-08-15 17:20 ` Noam Postavsky
2019-08-16 14:36 ` David Biesack
2019-08-18 17:51 ` Noam Postavsky
2019-08-20 15:07 ` David Biesack
2019-08-21 2:47 ` Noam Postavsky
2019-08-21 12:47 ` David Biesack
2020-11-25 17:19 ` David Biesack
2021-05-12 15:37 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87imr7qi58.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=36877@debbugs.gnu.org \
--cc=David.Biesack@Apiture.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.