[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71961: [PATCH] Improve tab-line-tabs-fixed-window-buffers performanc
From: |
Jeremy Bryant |
Subject: |
bug#71961: [PATCH] Improve tab-line-tabs-fixed-window-buffers performance |
Date: |
Sun, 07 Jul 2024 21:32:10 +0100 |
Eval Exec <execvy@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]...