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

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

bug#71961: [PATCH] Improve tab-line-tabs-fixed-window-buffers performanc


From: Eval Exec
Subject: bug#71961: [PATCH] Improve tab-line-tabs-fixed-window-buffers performance
Date: Fri, 5 Jul 2024 22:50:40 +0800

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

Attachment: 0001-Improve-tab-line-tabs-fixed-window-buffers-performan.patch
Description: Text Data


reply via email to

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