GNU bug report logs - #71961
[PATCH] Improve tab-line-tabs-fixed-window-buffers performance

Previous Next

Package: emacs;

Reported by: Eval Exec <execvy <at> gmail.com>

Date: Sat, 6 Jul 2024 00:13:04 UTC

Severity: normal

Tags: patch

Merged with 71958, 71959, 71960

Fixed in version 30.0.60

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71961 in the body.
You can then email your comments to 71961 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#71961; Package emacs. (Sat, 06 Jul 2024 00:13:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eval Exec <execvy <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 06 Jul 2024 00:13:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eval Exec <execvy <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Improve tab-line-tabs-fixed-window-buffers performance
Date: Fri, 5 Jul 2024 22:50:40 +0800
[Message part 1 (text/plain, inline)]
Hello,
After noticing severe lag when `buffer-list` exceeds 1000 buffers,
particularly
with `tab-line-switch-to-prev-tab` and `tab-line-switch-to-next-tab`,
a profiler
revealed that the sorting operation in
`tab-line-tabs-fixed-window-buffers` heavily
relies on the `seq-position` function. This reliance significantly
impacts performance.
To address this, I have proposed a patch to optimize the buffer
sorting mechanism within
`tab-line-tabs-fixed-window-buffers`. The solution involves replacing
the inefficient
`seq-position` calls with a hash table to cache buffer positions,
which markedly
enhances performance when handling large buffer lists.

This is my first attempt at hacking Emacs. Do you have any suggestions
on this idea?

Thank you
[0001-Improve-tab-line-tabs-fixed-window-buffers-performan.patch (text/x-patch, attachment)]

Merged 71958 71959 71960 71961. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 06 Jul 2024 06:32:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 30.0.60, send any further explanations to 71958 <at> debbugs.gnu.org and Eval Exec <execvy <at> gmail.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Sun, 07 Jul 2024 18:26:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71961; Package emacs. (Sun, 07 Jul 2024 20:33:01 GMT) Full text and rfc822 format available.

Message #12 received at 71961 <at> debbugs.gnu.org (full text, mbox):

From: Jeremy Bryant <jb <at> jeremybryant.net>
To: Eval Exec <execvy <at> gmail.com>
Cc: 71961 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#71961: [PATCH] Improve tab-line-tabs-fixed-window-buffers
 performance
Date: Sun, 07 Jul 2024 21:32:10 +0100
Eval Exec <execvy <at> gmail.com> writes:

> Hello,
> After noticing severe lag when `buffer-list` exceeds 1000 buffers,

1000?

> particularly
> with `tab-line-switch-to-prev-tab` and `tab-line-switch-to-next-tab`,
> a profiler
> revealed that the sorting operation in
> `tab-line-tabs-fixed-window-buffers` heavily
> relies on the `seq-position` function. This reliance significantly
> impacts performance.
> To address this, I have proposed a patch to optimize the buffer
> sorting mechanism within
> `tab-line-tabs-fixed-window-buffers`. The solution involves replacing
> the inefficient
> `seq-position` calls with a hash table to cache buffer positions,
> which markedly
> enhances performance when handling large buffer lists.
>
> This is my first attempt at hacking Emacs. Do you have any suggestions
> on this idea?

Adding Juri to this bug report

>
> Thank you
>
> [2. text/x-patch; 0001-Improve-tab-line-tabs-fixed-window-buffers-performan.patch]...




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 10 Aug 2024 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 215 days ago.

Previous Next


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