From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers Date: Sun, 17 Dec 2023 11:02:57 -0500 Message-ID: References: <878r919qfh.fsf@localhost> <83bkaurut9.fsf@gnu.org> <87o7esq319.fsf@localhost> <83bkasrb3f.fsf@gnu.org> <83wmtgpuyf.fsf@gnu.org> <871qboprh3.fsf@localhost> <87y1dwobey.fsf@localhost> <878r5v20gu.fsf@localhost> <83bkapl5zh.fsf@gnu.org> <83zfy9jkoh.fsf@gnu.org> <878r5tglwp.fsf@localhost> <83ttohjet0.fsf@gnu.org> <83sf41jed7.fsf@gnu.org> <87y1dtyu4y.fsf@localhost> <83plz5jdgj.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20964"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: dmitry@gutov.dev, Ihor Radchenko , mattias.engdegard@gmail.com, 66117@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 17 17:04:17 2023 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 1rEtcm-0005AZ-Tu for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Dec 2023 17:04:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEtca-000557-FX; Sun, 17 Dec 2023 11:04:05 -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 1rEtcY-00052n-8h for bug-gnu-emacs@gnu.org; Sun, 17 Dec 2023 11:04:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rEtcW-0008C8-MJ for bug-gnu-emacs@gnu.org; Sun, 17 Dec 2023 11:04:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEtcX-0000Mm-Ut for bug-gnu-emacs@gnu.org; Sun, 17 Dec 2023 11:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Dec 2023 16:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66117 X-GNU-PR-Package: emacs Original-Received: via spool by 66117-submit@debbugs.gnu.org id=B66117.17028289881335 (code B ref 66117); Sun, 17 Dec 2023 16:04:01 +0000 Original-Received: (at 66117) by debbugs.gnu.org; 17 Dec 2023 16:03:08 +0000 Original-Received: from localhost ([127.0.0.1]:58949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEtbg-0000LT-Fe for submit@debbugs.gnu.org; Sun, 17 Dec 2023 11:03:08 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:59978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEtbe-0000L3-NG for 66117@debbugs.gnu.org; Sun, 17 Dec 2023 11:03:07 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 02A9C10009E; Sun, 17 Dec 2023 11:03:00 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1702828979; bh=q75olqqo5M8cf47IJrNvrFRNEZkWb7ykOm4NW9LPTlA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=XuxR5DXQBwDpiQLoaS1borD7MTma26h4PbzGyZdZT4p6ofw6Kg+Sml9u+VIqWmxuT TOKHJnpfj4M+XuW/4yXVOKLw/uBN2v1ZyvGqywE0ZnFgBowIzT8luPyvbAo0gtGQD3 KspkLKQ9AAwF2oKVGFGibIaaE3BTj6/fC0T7+p0yxz9EBQdvbWkY09xBL9PvnoYeAv CoHJeRmpkgsZi9RikS0ijsoC9CRaWX2DueSXFJdSV2PIym9H1oneABePmfUTbXki1B KTsLLLhKQXVZa7vupFWxnFBdoJteDSzZ8rYbd7WEYrLuj8gUlPDSAxJVb1/EX4Ip5a MfQvLq/NTh+nQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0914310001D; Sun, 17 Dec 2023 11:02:59 -0500 (EST) Original-Received: from pastel (65-110-221-238.cpe.pppoe.ca [65.110.221.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C6470120EB6; Sun, 17 Dec 2023 11:02:58 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Sun, 17 Dec 2023 10:17:40 -0500") 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:276431 Archived-At: > Most of the DEFVAR_PER_BUFFER variables behave just like any > normal variable. They just use a different implementation strategy and > the C code works hard to hide that difference. BTW, one reason why the C code works hard to hide that difference is that we already have enough different kinds of variables making life complicated for the poor ELisp coders: - lexical vars - "normal" vars (`defvar`) - buffer-local vars (`make-local-variable`) - automatically buffer-local vars (`make-variable-buffer-local` or DEFVAR_PER_BUFFER) - always buffer-local vars (DEFVAR_PER_BUFFER plus a -1 value in buffer_local_flags) - integer-only vars (DEFVAR_INT) - boolean-only vars (DEFVAR_BOOL) - aliases (defvaralias) - so-called "terminal-local" vars which are actually keyboard-local, where several "terminals" can share the same keyboard (DEFVAR_KBOARD), tho nowadays this virtually never happens, but makes for extra complexity/bugs. [ And we used to also have frame-local vars, as well as simultaneously frame-local and buffer-local vars, but we got rid of those. ] Stefan