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: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: dmitry <at> gutov.dev, Ihor Radchenko <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: Sun, 17 Dec 2023 11:02:57 -0500
> Most of the DEFVAR_PER_BUFFER variables behave just like any
> normal variable.  They just use a different implementation strategy and
> the C code works hard to hide that difference.

BTW, one reason why the C code works hard to hide that difference is
that we already have enough different kinds of variables making life
complicated for the poor ELisp coders:
- lexical vars
- "normal" vars  (`defvar`)
- buffer-local vars (`make-local-variable`)
- automatically buffer-local vars (`make-variable-buffer-local` or DEFVAR_PER_BUFFER)
- always buffer-local vars (DEFVAR_PER_BUFFER plus a -1 value in buffer_local_flags)
- integer-only vars (DEFVAR_INT)
- boolean-only vars (DEFVAR_BOOL)
- aliases (defvaralias)
- so-called "terminal-local" vars which are actually keyboard-local, where
  several "terminals" can share the same keyboard (DEFVAR_KBOARD), tho
  nowadays this virtually never happens, but makes for extra complexity/bugs.
[ And we used to also have frame-local vars, as well as simultaneously
  frame-local and buffer-local vars, but we got rid of those.  ]


        Stefan





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.