patch 9.1.1622: Patch v9.1.1432 causes performance regressions

Problem:  Patch v9.1.1432 causes performance regressions
Solution: Revert "patch 9.1.1432: GTK GUI: Buffer menu does not handle
          unicode correctly" (Yee Cheng Chin).

This reverts commit 08896dd330.

The previous change to support Unicode characters properly in the
buffers menu resorted to removing all buffer menus and re-add the
buffers after doing a sort, per each buffer addition. This was quite
slow because if Vim is trying to load in multiple buffers at once (e.g.
when loading a session) this scales in O(n^2) and Vim can freeze for
dozens of seconds when adding a few hundred buffers.

related: #17405
related: #17928
fixes: #17897

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yee Cheng Chin
2025-08-10 10:03:26 +02:00
committed by Christian Brabandt
parent da9c966893
commit cda0d17f59
3 changed files with 39 additions and 36 deletions

View File

@ -1767,17 +1767,4 @@ func Test_CursorHold_not_triggered_at_startup()
call assert_equal(['g:cursorhold_triggered=0'], found)
endfunc
" Test that buffer names are shown at the end in the :Buffers menu
func Test_Buffers_Menu()
doautocmd LoadBufferMenu VimEnter
let name = '天'
exe ':badd ' .. name
let nr = bufnr('$')
let cmd = printf(':amenu Buffers.%s\ (%d)', name, nr)
let menu = split(execute(cmd), '\n')[1]
call assert_match('^9999 '.. name, menu)
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@ -719,6 +719,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1622,
/**/
1621,
/**/