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: Mon, 09 Oct 2023 10:16:14 +0000 Message-ID: <87h6n0m781.fsf@localhost> References: <878r919qfh.fsf@localhost> <87cyyawd1a.fsf@localhost> <83pm2a5k85.fsf@gnu.org> <87wmwh2tae.fsf@localhost> <83zg1d468w.fsf@gnu.org> <87bkdr2651.fsf@localhost> <87pm2584oz.fsf@localhost> <83cyy11ln1.fsf@gnu.org> <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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28974"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, 66117@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 09 12:16:41 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 1qpnJY-0007I2-P9 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Oct 2023 12:16:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpnJB-0006aO-VY; Mon, 09 Oct 2023 06:16:18 -0400 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 1qpnIf-0006Sw-Ub for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 06:15:52 -0400 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 1qpnIb-0002ea-HI for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 06:15:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpnIv-0002bh-T1 for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 06:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Oct 2023 10:16: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.16968465299980 (code B ref 66117); Mon, 09 Oct 2023 10:16:01 +0000 Original-Received: (at 66117) by debbugs.gnu.org; 9 Oct 2023 10:15:29 +0000 Original-Received: from localhost ([127.0.0.1]:59360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpnIO-0002au-T4 for submit@debbugs.gnu.org; Mon, 09 Oct 2023 06:15:29 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:56887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpnIN-0002ad-As for 66117@debbugs.gnu.org; Mon, 09 Oct 2023 06:15:27 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BABD4240101 for <66117@debbugs.gnu.org>; Mon, 9 Oct 2023 12:15:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1696846500; bh=uSVqRQKstc2KZ5KMAP3oAwDOR/Bsz4axTWB+XxKf3lc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=MSbkAnauM6nLTx9lqFMR7XsI+KPz6ntPlcUnlGcJ9s0O6OoaGPBPZ03ne5pwSDpdL Z1XiNF/nJIlcemI0Gn7iXHLBclj9KmQoaoCSb8k742kBS3y6g2gFhDHS1icICfFpgZ C3QIg/y4asajQ3Qgdxd0bHeoOighi56H8GXqkf/9Q6EWn6mTQdUdSizsE0fUxtg7Z/ YkDnWAQw1Y+dFX4Oyc0uynNT4MWOO7njxaedxr63gX69XG8yAYsBcTjc8Qq7peQGaB gG5dEk1DIZWMqOlDGFXUX/QskEhRfyinJP+J4Q3zNinfYG9gQid2QFIMMNdI4dil3J RqRSu3e6BuZYw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S3vzS0d7Yz6tvh; Mon, 9 Oct 2023 12:14:59 +0200 (CEST) In-Reply-To: <87jzrwm7ul.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:272139 Archived-At: Ihor Radchenko writes: > The main contributor is set_default_internal. I _suspect_ (because we > have non-linear scaling with the number of buffers - 3x increase in the > number of files lead to ~6x increase in the run time) that the main > contributor here is let-binding `case-fold-search' - special per-buffer > variable with no default value. My suspicion appears to be correct - removing let-binding for case-fold-search from `abbreviate-file-name' and `inhibit-local-variables-p' made them disappear from the top of the reverse call tree. Then, considering the ubiquity of let-binding case-fold-search across Elisp code, speeding up let-binding of special per-buffer variables may give us performance boost across Emacs. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at