From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko 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 13:06:06 +0000 Message-ID: <87r0jqw8u9.fsf@localhost> References: <878r919qfh.fsf@localhost> <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> <83plzas3pg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23922"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, 66117@debbugs.gnu.org, Stefan Monnier To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 13 14:06:56 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 1rDOwx-0005xa-Cj for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Dec 2023 14:06:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDOur-00057n-II; Wed, 13 Dec 2023 08:04:45 -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 1rDOtu-0002rY-NK for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 08:03:46 -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 1rDOtu-0007O3-7o for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 08:03:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rDOuA-0005Ux-5W for bug-gnu-emacs@gnu.org; Wed, 13 Dec 2023 08:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Dec 2023 13:04: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.170247262321109 (code B ref 66117); Wed, 13 Dec 2023 13:04:02 +0000 Original-Received: (at 66117) by debbugs.gnu.org; 13 Dec 2023 13:03:43 +0000 Original-Received: from localhost ([127.0.0.1]:58402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDOtq-0005UP-MG for submit@debbugs.gnu.org; Wed, 13 Dec 2023 08:03:42 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:58117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDOtm-0005U7-GI for 66117@debbugs.gnu.org; Wed, 13 Dec 2023 08:03:40 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 618C3240101 for <66117@debbugs.gnu.org>; Wed, 13 Dec 2023 14:03:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1702472596; bh=gPFmIvcbkI2ERLNfXpjxG91zVJH3cEYFBnOvdJWqy88=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=QKGV2mHMpsBk2mKAYKZwg+roclV9URw2zjiwuIG4TIXh9POHNN0t9T3pi/8XC3/2L 9bTTjAfOzh/2BDn0muEGaI9uOOq081nNYoMJXZXH71kIYAtjolDJZYkFF80ZtD2wBg T5AOxkjtgXmxL3+9pdqmR6GlYHx1dD31I9g2VvJ+sSaNIYuCZ8Da5T+bg2RNOzABYk aV4ZSkA+/Ja+kNQAWzjvsfIQK2P1q4M6TbJgoOR9IJ8soWDOq2f8JTWSkmJwUbYflS xZYyK/6Mxtx1WVLa3Nv7+CUvowGIl/M0YMZ+yK4gPZ4xFlmcRv1uGMHO5dYryxpHIg rpX696Wgwuklg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SqwdZ6kv4z6tvb; Wed, 13 Dec 2023 14:03:14 +0100 (CET) In-Reply-To: <83plzas3pg.fsf@gnu.org> 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:276125 Archived-At: Eli Zaretskii writes: > Btw, the title of this bug is about find-buffer-visiting, and AFAIR I > proposed to have a primitive written in C that replaces > find-buffer-visiting without a need to actually switch to each buffer > (which is what triggers the costly rebinding of buffer-local variables > like case-fold-search). So why we are talking about case-fold-search > instead of solving the original problem? If we want to discuss the > case-fold-search issue, IMO we should discuss it in a separate bug > report. The bottlenecks now (after applying my patch for `find-buffer-visiting') are `abbreviate-file-name' and `inhibit-local-variables-p'; not the `find-buffer-visiting' per se (both are slow because they let-bind case-fold-search). AFAIU, it is very hard to rewrite them in C, as I explained in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66117#157 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at