GNU bug report logs - #66117
30.0.50; `find-buffer-visiting' is slow when opening large number of buffers

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Wed, 20 Sep 2023 08:53:02 UTC

Severity: minor

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: dmitry <at> gutov.dev, yantar92 <at> posteo.net, mattias.engdegard <at> gmail.com, 66117 <at> debbugs.gnu.org
Subject: bug#66117: 30.0.50; `find-buffer-visiting' is slow when opening large number of buffers
Date: Thu, 14 Dec 2023 20:49:50 +0200
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: yantar92 <at> posteo.net,  dmitry <at> gutov.dev,  66117 <at> debbugs.gnu.org,
>   mattias.engdegard <at> gmail.com
> Date: Thu, 14 Dec 2023 13:11:58 -0500
> 
> >> > But for starters, a new Lisp-only global variable should be good, I
> >> > think.  Stefan, any comments?
> >> 
> >> I must say I don't understand the reasoning behind this.
> >> What would it do different from `case-fold-search`?
> >
> > It won't be buffer-local-if-changed, so binding it will not be costly.
> 
> As mentioned elsewhere in this bug-report we can make `case-fold-search`
> into a `DEFVAR_LISP`: it would have no visible impact to ELisp and would
> avoid the costly let-bindings.

Didn't we just agree that would be a breaking change?

> > It also won't be a defcustom, so let-binding it will not step on the
> > user's preferences.
> 
> Hmm... when/where do existing let-bindings of `case-fold-search` step on
> user settings of that var?

Each time we let-bind it in code used in searching and/or matching
commands.

> IME the problem is rather the opposite: most calls to search functions
> don't explicitly let-bind `case-fold-search` and instead rely naively on
> the default value and are thus susceptible to bugs if/when someone sets
> the custom var (globally or buffer-locally).

I don't see that as a bug: the user said he/she wants the search to be
case-insensitive, so they should get what they asked for.




This bug report was last modified 1 year and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.