bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59935: 29.0.60; project-list-buffers is slow


From: Dmitry Gutov
Subject: bug#59935: 29.0.60; project-list-buffers is slow
Date: Sun, 11 Dec 2022 18:32:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 11/12/2022 12:54, Eli Zaretskii wrote:
Date: Sun, 11 Dec 2022 12:23:13 +0200
Cc: 59935@debbugs.gnu.org, juri@linkov.net
From: Dmitry Gutov <dgutov@yandex.ru>

The main problematic behavior (low performance) is exhibited by the
"latest" branch, which looks like this:

    (let ((pr (project-current t)))
        (display-buffer
         (if (version< emacs-version "29.0.50")
             ;; ...
           (list-buffers-noselect
            arg nil (lambda (buf) (memq buf (project-buffers pr)))))))

Yes, I see that.  I still don't understand: this can easily be changed
to call project-buffers just once.

Cue my very first response:

  If we just do that, pressing 'g' will only show the buffers that
  belonged to the project when project-list-buffers was called. And not
  necessarily the *current* list of project buffers.

Though I guess there might be ways to avoid this, like creating a cache which will be invalidated in post-command-hook, something like that.

Anyway, I only entered this discussion because you asked about making
some non-trivial changes on the release branch.  If that is no longer
an issue, I will gladly bow out of this.

I expect Juri is going to argue for that later. For non-trivial changes
in buff-menu.el, no less.

I will wait for his comments, then.

Let's.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]