From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#36877: 25.3; uniquify renaway uniquify-managed list Date: Thu, 08 Aug 2019 20:47:31 -0400 Message-ID: <87imr7qi58.fsf@gmail.com> References: <183FDF33-F082-4E2F-BC62-6156A83FFADD@apiture.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="69080"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) Cc: 36877@debbugs.gnu.org To: David Biesack Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 09 02:48:20 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hvt4t-000HtQ-Ur for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Aug 2019 02:48:20 +0200 Original-Received: from localhost ([::1]:55816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvt4s-0001mP-Ad for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Aug 2019 20:48:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59663) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvt4d-0001m7-9W for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2019 20:48:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvt4c-0003Gk-Ms for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2019 20:48:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33108) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvt4c-0003Gb-Ho for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2019 20:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hvt4c-0002XL-Em for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2019 20:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Aug 2019 00:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36877 X-GNU-PR-Package: emacs Original-Received: via spool by 36877-submit@debbugs.gnu.org id=B36877.15653116629717 (code B ref 36877); Fri, 09 Aug 2019 00:48:02 +0000 Original-Received: (at 36877) by debbugs.gnu.org; 9 Aug 2019 00:47:42 +0000 Original-Received: from localhost ([127.0.0.1]:41929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvt4G-0002Wd-3t for submit@debbugs.gnu.org; Thu, 08 Aug 2019 20:47:42 -0400 Original-Received: from mail-ot1-f50.google.com ([209.85.210.50]:41335) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvt4E-0002WR-6F for 36877@debbugs.gnu.org; Thu, 08 Aug 2019 20:47:38 -0400 Original-Received: by mail-ot1-f50.google.com with SMTP id o101so126237234ota.8 for <36877@debbugs.gnu.org>; Thu, 08 Aug 2019 17:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=vMcw95VK3Hn3Nsy/32Z6eU7OJawQngr9YV3QZMJhhe0=; b=lDFEu2hmfdJ4quxlfz8OWOUaLuJZdRpEVqcXVuJ94TMZ/1du8mlh4rqxTjvCqzVPre 1u/j5WRfEIbFAACzCW3KEV4OXF70NC0wt4TSA4u9VvnjMN9gBE7VOvPVouAyRVHc1GNK mNrVuIL1gyIVoaBALb77EwXjKkWKG3CdM3JxXVVDJOruwDXb/qVA7JB4ZJU+sCqV240Z 8Vm5pjpR8uGGEHxc1lvlbkBIANbHluR6+4+7p5Va47jm1YIjJu+lKdoQAMVjqhivy3rF /QCEjmDhoFP9I0YxArYKeJZR+al5/VHfPHchy/r++eakujNrDaaqo3jF40ylDaz7L5Cc 6Eig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=vMcw95VK3Hn3Nsy/32Z6eU7OJawQngr9YV3QZMJhhe0=; b=ew4Nxt6B6XH+ohtizbKPwV86SYLFXzM9TkNyG1uFmpvgiZgByIc1G7nvWukVd6SW0J U8XMOXW9pWbFG2HC34s0FGi2HKnnWwSN4xX6C0ljHJTFpxRTWkL57Pd8hUz+TM22eh8f 1RvDlltWu1duXIGOhau/6EtvbdiLEGtTStQmXio+CgXoieSGyq21Hk0PJHgsmuTTH3Ml 8YQk0A9bD2nm1XBB8HSWAZavV74aGAQzZTxoPThfeHCAdqKVdRLRJLGgT6mANLXIv5uH 4EdLYDTYdRi3nACZVCq5x++PcRVTlli2ZWRw3ddKK+xy/JI0ZsLHcxp3nM7S6rRb+go+ /zpw== X-Gm-Message-State: APjAAAVkZVKq9YM8/kLBkSgN0RxHuDCrysR5zgtnu9MQAJWpTUCnZrWZ JHowmjWoghdLS2EkKBarW23hejm5 X-Google-Smtp-Source: APXvYqwOcUe4R7eKHFzmmLSLYGBxnvxJugFf+EaVHl4FdYyasDZ/9D5N6K+YP0o4hVLwGObVbZAoxQ== X-Received: by 2002:a02:c6a9:: with SMTP id o9mr20328628jan.90.1565311652260; Thu, 08 Aug 2019 17:47:32 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id s10sm198589221iod.46.2019.08.08.17.47.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Aug 2019 17:47:31 -0700 (PDT) In-Reply-To: <183FDF33-F082-4E2F-BC62-6156A83FFADD@apiture.com> (David Biesack's message of "Wed, 31 Jul 2019 16:04:56 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164789 Archived-At: David Biesack 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)