From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59935: 29.0.60; project-list-buffers is slow Date: Sat, 10 Dec 2022 22:11:13 +0200 Message-ID: <831qp7vx26.fsf@gnu.org> References: <83o7sby8yk.fsf@gnu.org> <33ee7805-b5ee-ce62-042f-d980184e327e@yandex.ru> <838rjfy0kx.fsf@gnu.org> <2fe25562-401b-1b7b-d3fd-8d0820f4567c@yandex.ru> <83h6y3wco8.fsf@gnu.org> <834ju3vyeb.fsf@gnu.org> <16e4e192-21f9-c46d-2e86-5c24fd4962b7@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7879"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59935@debbugs.gnu.org, juri@linkov.net To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 10 21:12:25 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p46Cu-0001pV-Mf for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Dec 2022 21:12:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p46Ca-0005E7-Gj; Sat, 10 Dec 2022 15:12:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p46CY-0005Ds-9C for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 15:12:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p46CX-0003qe-Rr for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 15:12:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p46CX-0005Vt-N1 for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 15:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2022 20:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59935 X-GNU-PR-Package: emacs Original-Received: via spool by 59935-submit@debbugs.gnu.org id=B59935.167070308621184 (code B ref 59935); Sat, 10 Dec 2022 20:12:01 +0000 Original-Received: (at 59935) by debbugs.gnu.org; 10 Dec 2022 20:11:26 +0000 Original-Received: from localhost ([127.0.0.1]:44819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p46By-0005Vb-BG for submit@debbugs.gnu.org; Sat, 10 Dec 2022 15:11:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p46Bw-0005VR-0D for 59935@debbugs.gnu.org; Sat, 10 Dec 2022 15:11:25 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p46Bq-0002Cx-A2; Sat, 10 Dec 2022 15:11:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=GfXZXKmpVUKgGDSTjF0qeKtJbnGgYO9mOsdDyyMOfiI=; b=ZzTwpzPCY9nV OkG2W3LVPae32b2FTlQbk4byEVO4sjB8noBKMl26V0uzx9y7A6DkpmIyfIQjlSi59avMYcPCeUH1F mMMniFCAX+BbF4IH9nudwU2oLTvRz5yQhpkGjWNmZ3vUadbYdJWT9XvAhjFaLxGJP500EjVlPf1nV RiYEW/LffaCN0WhtIJjc8dRWdC6CyDopXAuaK/19YneuuSKVLJmq/CTrvu1kn0YG/DY4dgBXkyS6n 6V3rBUe0lF0Rr7XESaqFXU1U3OjPz9eGquNam+D8aLV0qhJ08JgO2FNgw0QX8fq6g6tzYn2agaNZT 984yckHS5SCtX9hNZsXKcQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p46Bp-0006V3-NV; Sat, 10 Dec 2022 15:11:18 -0500 In-Reply-To: <16e4e192-21f9-c46d-2e86-5c24fd4962b7@yandex.ru> (message from Dmitry Gutov on Sat, 10 Dec 2022 21:53:28 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250556 Archived-At: > Date: Sat, 10 Dec 2022 21:53:28 +0200 > Cc: 59935@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > > On 10/12/2022 21:42, Eli Zaretskii wrote: > >> Date: Sat, 10 Dec 2022 21:19:30 +0200 > >> Cc:59935@debbugs.gnu.org,juri@linkov.net > >> From: Dmitry Gutov > >> > >> On 10/12/2022 16:33, Eli Zaretskii wrote: > >>> OK, but I didn't suggest making any changes to revert-buffer-function > >>> set up by "C-x p C-b". You can still use process-buffers there, and > >>> it shouldn't slow down "C-x p C-b" itself, since the call to > >>> process-buffers that is part of revert-buffer-function is not supposed > >>> to be evaluated when you set revert-buffer-function. Right? Or what > >>> else am I missing? > >> Then only the 'g' binding will remain slow. An improvement, of course. > > Why slow? it calls project-buffers only once. > > You're looking at the "legacy" code path. Where emacs-version is < 29. I'm looking at the code you posted as the original one, which is identical to what I see on the current emacs-29 branch. That means Emacs 29, unless I'm seriously confused. > In the "new" one revert-buffer-function uses the filter-predicate > argument we pass to list-buffers-noselect. Which is > > (lambda (buf) (memq buf (project-buffers pr))) I see this in emacs-29: (setq-local revert-buffer-function (lambda (&rest _ignored) (list-buffers--refresh (project-buffers pr)) (tabulated-list-print t)))) So I still don't understand your fears.