From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#31853: (27.0.50; binding case-fold-search is slow when there are many buffers) Date: Sat, 30 Jun 2018 09:18:23 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1530364641 9815 195.159.176.226 (30 Jun 2018 13:17:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Jun 2018 13:17:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 31853@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 30 15:17:16 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZFkU-0002FV-C3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2018 15:17:10 +0200 Original-Received: from localhost ([::1]:46898 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZFma-00064l-00 for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2018 09:19:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZFmN-00062b-EL for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 09:19:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZFmI-0003Oz-Ha for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 09:19:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60770) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZFmI-0003Ot-EM for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 09:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fZFmI-00087T-9B for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 09:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jun 2018 13:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31853-submit@debbugs.gnu.org id=B31853.153036470631163 (code B ref 31853); Sat, 30 Jun 2018 13:19:02 +0000 Original-Received: (at 31853) by debbugs.gnu.org; 30 Jun 2018 13:18:26 +0000 Original-Received: from localhost ([127.0.0.1]:40434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZFli-00086Z-KJ for submit@debbugs.gnu.org; Sat, 30 Jun 2018 09:18:26 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:43960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZFlh-00086R-3J for 31853@debbugs.gnu.org; Sat, 30 Jun 2018 09:18:25 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w5UDINRs031531; Sat, 30 Jun 2018 09:18:24 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id BFF3F67A3C; Sat, 30 Jun 2018 09:18:23 -0400 (EDT) In-Reply-To: (Aaron Jensen's message of "Fri, 15 Jun 2018 19:10:08 -0700") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6319=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6319> : inlines <6730> : streams <1791187> : uri <2666443> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148016 Archived-At: > Is it possible to improve this somehow? In this instance it's actually > org-mode that's binding case-fold-search in a tight loop in > org-scan-tags. BTW, I think that the idea that let-binding a dynamically-scoped var is cheap is wrong. It's basically only cheap when lexical-binding works as well ;-) So regardless of whether we can speed it up like Eli did just now (by only looping over the live buffers), the org-scan-tags code that let-binds it within a tight loop should be fixed. Stefan