[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Improve `tab-line-tabs-fixed-window-buffers` sorting performance
From: |
Eval Exec |
Subject: |
[PATCH] Improve `tab-line-tabs-fixed-window-buffers` sorting performance |
Date: |
Fri, 5 Jul 2024 22:27:10 +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
0001-Improve-tab-line-tabs-fixed-window-buffers-sorting-p.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Improve `tab-line-tabs-fixed-window-buffers` sorting performance,
Eval Exec <=