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
View this message in rfc822 format
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: dmitry <at> gutov.dev, 66117 <at> debbugs.gnu.org
> Date: Tue, 12 Dec 2023 14:24:35 +0000
>
> Ihor Radchenko <yantar92 <at> posteo.net> writes:
>
> > Ihor Radchenko <yantar92 <at> posteo.net> 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.
>
> What do you think about introducing something like
>
> struct buffer buffer_overrides;
>
> It will be similar to buffer_defaults in buffer.c, but will hold the
> overriding values of buffer-local variables that are to be used instead
> of proper buffer-local variables. That way, we can speed up let-binding
> of case-fold-search.
I'm sorry, I don't think I understand how this will work and avoid the
problems we have with let-binding. So I added Stefan, in the hope
that he might understand what I am evidently missing.
This bug report was last modified 1 year and 136 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.