GNU bug report logs -
#66117
30.0.50; `find-buffer-visiting' is slow when opening large number of buffers
Previous Next
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
Message #265 received at 66117 <at> debbugs.gnu.org (full text, mbox):
>>> 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.
> Wouldn't DEFVAR_LISP break major modes that do (setq case-fold-search ...)?
No, it makes no difference to Lisp. It only changes the implementation
strategy: DEFVAR_LISP stores the value in a global C variable (which
thus requires more processing when the var is buffer-local, more
specifically updating the C var when we `set-buffer`), whereas
DEFVAR_PER_BUFFER stores the value inside the buffer object (which
thus requires more processing when the var is *not* buffer-local since
the global value is duplicated in all the buffers where it's not made
buffer-local).
DEFVAR_PER_BUFFER are thus the better option for vars which are set
buffer-locally in most buffers whereas DEFVAR_LISP is the better option
for vars which are made buffer-local only in a few buffers.
Stefan
This bug report was last modified 1 year and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.