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.

Full log


View this message in rfc822 format

From: Eval Exec <execvy <at> gmail.com>
To: 71961 <at> debbugs.gnu.org
Subject: bug#71961: [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)]

This bug report was last modified 315 days ago.

Previous Next


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