From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers Date: Wed, 13 Dec 2023 01:47:59 +0200 Message-ID: References: <878r919qfh.fsf@localhost> <87lecp84mf.fsf@localhost> <83ttrdx8j9.fsf@gnu.org> <87a5su261p.fsf@localhost> <838r8e24yy.fsf@gnu.org> <87y1gezspg.fsf@localhost> <834jj21z05.fsf@gnu.org> <87il7izo4l.fsf@localhost> <831qe61xrh.fsf@gnu.org> <87cyxqzmhh.fsf@localhost> <83zg0uzlgw.fsf@gnu.org> <87v8bhxzcu.fsf@localhost> <83y1gdxws8.fsf@gnu.org> <87jzrwm7ul.fsf@localhost> <87h6n0m781.fsf@localhost> <87v8935wik.fsf@localhost> <83msuftr0i.fsf@gnu.org> <87plzbxtxa.fsf@localhost> <87y1dzvvf0.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22890"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Eli Zaretskii , 66117@debbugs.gnu.org To: Ihor Radchenko , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 13 00:49:10 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 1rDCUu-0005j4-V3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Dec 2023 00:49:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDCUf-0008JS-Nf; Tue, 12 Dec 2023 18:48:55 -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 1rDCUa-0008J8-6H for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 18:48:49 -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 1rDCUY-0004iT-Q1 for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 18:48:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rDCUo-0005Uc-46 for bug-gnu-emacs@gnu.org; Tue, 12 Dec 2023 18:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Dec 2023 23:49:02 +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.170242490620902 (code B ref 66117); Tue, 12 Dec 2023 23:49:02 +0000 Original-Received: (at 66117) by debbugs.gnu.org; 12 Dec 2023 23:48:26 +0000 Original-Received: from localhost ([127.0.0.1]:57936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDCUD-0005R2-V2 for submit@debbugs.gnu.org; Tue, 12 Dec 2023 18:48:26 -0500 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:39065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDCUC-0005QK-Cl for 66117@debbugs.gnu.org; Tue, 12 Dec 2023 18:48:24 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id C93873200ACC; Tue, 12 Dec 2023 18:48:02 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 12 Dec 2023 18:48:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1702424882; x=1702511282; bh=h5JBG04/2vcxneN2OhPLgK3whOZBp0tQBC7sQGvZFZQ=; b= gaCXZpUFGs32HAUiLssI/SF48R7EQ2vRTXslyD3OgGuXWrcs+Q5cXdoSj9GlVyex Ug0Wtnkk51ltbTfefK01OrkRx1eZrRY1dNuH1zwwlHEbNKd38ww4MrN6uaH3cc7S 1QRVPkQBJI81G7PQrsdtdXnTLifhOEiCkuSNEz7VhJwbKon4Z840cgnou1DzlAwj XfNLC8FZSJkse5g3R8EgiRk5n6K5q/CCiowFhhvtzy+ad2p5jgaK/pwRpPh6+YVa j9WVFEAzcnV2FxmLpKbpE6BJbHY41mNbNR166DMY7cwmosI/Yr5dbUjDl3700a7x lhKyuy7IcwTZOPXTKkpUHA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1702424882; x= 1702511282; bh=h5JBG04/2vcxneN2OhPLgK3whOZBp0tQBC7sQGvZFZQ=; b=j VDNS5JCmG8xwKglBz1lwpN5g8BOTCt9jPHUSDE1wvsPtJFOyFEg7qqxmcrcPYuxR p2eY4Sqot5B6VNZhqq1xPyTm4KCE+vma/fIng7hfZeR3X9ujfKZWz7+Nup4vNqlq vjlerSJr3HtNTaLPXfqm4czUVqth3+dJncaw4yBJnmHgImP35EgG3m8zXMtIJvN7 Y9TLeEfoa/taSfOu+pW4ZwVZHNwTyw/No1I+iSnlbHqp0tZ1YDRBZM+eyh1uJHs6 RimUNspK5cXMJ4GMOjaT+xYwgr8jKF/F+vzXn35VsLFqRTj6oChJLmeSgy49r9I1 unggvIoU9Xsw2OY42T7Rw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelhedgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Dec 2023 18:48:00 -0500 (EST) Content-Language: en-US In-Reply-To: <87y1dzvvf0.fsf@localhost> 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:276101 Archived-At: On 13/12/2023 01:43, Ihor Radchenko wrote: > Stefan Monnier writes: > >>> E.g. company-dabbrev-code creates a dynamic binding for case-fold-search in >>> one place and then calls a function (company-dabbrev--search) that iterates >>> across all buffers with re-search-forward. >> BTW, that `company-dabbrev-code` function may not do what you expect >> in those buffers that have set `case-fold-search` buffer-locally. > Yup. > > Steps to reproduce: > > 1. emacs -Q > 2. M-: (setq-local case-fold-search nil) > 3. C-x b (to*Messages*) > 4. M-: (let ((case-fold-search t)) (with-current-buffer (get-buffer "*scratch*") (search-forward "CREATE"))) > 5. Observe search failing > > If step (2) is omitted, search succeeds. That's a good data point, but since I don't understand why anybody would make (or does make) case-fold-search buffer-local, I'm not going to hurry to fix those cases. > Although, I am not sure if I like that let-binding is not reliable for > buffer-locals. It is simply confusing from the point of view of let > usage; even if documented. I'd rather go for `let' becoming more consistent. That sounds attractive (ignoring all buffer-locals when let-bound?), but I'm guessing there are enough valid use cases for this behavior.