From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Question about memory usage Date: Thu, 05 Apr 2018 14:54:16 -0400 Message-ID: References: <83sh8c6byb.fsf@gnu.org> <690641bc-fc49-922a-26bd-6f92322d0cc0@zoho.com> <83po3g40c3.fsf@gnu.org> <83bmez4g0b.fsf@gnu.org> <36b25160-eef1-73cf-c585-f798a7cef44c@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1522954369 30763 195.159.176.226 (5 Apr 2018 18:52:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Apr 2018 18:52:49 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: =?utf-8?Q?Micha=C5=82?= Kondraciuk Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 05 20:52:44 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f4A00-0007n2-Kk for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Apr 2018 20:52:40 +0200 Original-Received: from localhost ([::1]:47895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f4A26-0004bt-5P for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Apr 2018 14:54:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f4A1d-0004bV-NM for help-gnu-emacs@gnu.org; Thu, 05 Apr 2018 14:54:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f4A1a-00037m-EI for help-gnu-emacs@gnu.org; Thu, 05 Apr 2018 14:54:21 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:54376) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f4A1a-00037A-81; Thu, 05 Apr 2018 14:54:18 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w35IsG7Z032421; Thu, 5 Apr 2018 14:54:16 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 0FD5E6637D; Thu, 5 Apr 2018 14:54:16 -0400 (EDT) In-Reply-To: <36b25160-eef1-73cf-c585-f798a7cef44c@zoho.com> (=?utf-8?Q?=22Micha=C5=82?= Kondraciuk"'s message of "Thu, 5 Apr 2018 20:06:34 +0200") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6258=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6258> : inlines <6550> : streams <1783293> : uri <2621020> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116355 Archived-At: > I found out what the problem was: > > (while t > (with-temp-buffer > (setq buffer-undo-list nil) > (insert "a") > (print (length undo-auto--undoably-changed-buffers) > #'external-debugging-output))) Aha! > The variable undo-auto--undoably-changed-buffers was storing a lot of killed > buffers. We could/should probably arrange to scan for dead buffers every time we add a new buffer to it, or from kill-buffer-hook. Stefan