作者发现Emacs在打开大量缓冲区时tab-line切换卡顿,通过性能分析定位到tab-line-tabs-fixed-window-buffers函数:其排序过程中调用seq-position导致O(N²)复杂度。作者用哈希表缓存缓冲区索引,以空间换时间消除卡顿,并将补丁提交至bug-gnu-emacs,获维护者认可,代码将随Emacs 31.0.51起收录。这是作者首次贡献GNU/Emacs。
A short note on how to set up a more beautiful tabline for Emacs.
完成下面两步后,将自动完成登录并继续当前操作。