:undo, :redo is incredibly slow when the change is big
Apply clang-format of totally different format like llvm in vim project. Undo the change, vim will completely get blocked with 100% usage for a while.
Can you describe the sequence of steps and configuration that can be used to reproduce this problem?
This might reproduce the issue.
# configure lsp with clangd in vimrc with compile commands json. (the step will be added if necessary)
# clang-format plugin
mkdir -p ~/.vim/pack/test/start
cd ~/.vim/pack/test/start
git clone https://github.com/rhysd/vim-clang-format.git
# checkout vim and generate compile commands json.
git clone https://github.com/vim/vim.git --depth=1
./configure
bear -- make -j
# Open c file in vim
vim src/userfunc.c
# clangformat in vim
:ClangFormat
# Undo the change
u
# Redo the change
ctrl + r
# vim gets stuck with 100% usage for a while for both u and ctrl + r.
what's relevant to this lsp plugin?
Thanks for the steps. I am able to reproduce the issue. It looks like when you undo all the edits, Vim invokes too many text changed notifications. I will look into this later.
~~@yegappan not sure if relevant or not, since i did not use those plugins,, but i do was thinking the 7x24 compl perhaps was triggered too much as long as textchangedi, as well as the lsp workload, specially it would re-trigger a no base char's complete() after <c-y> unless giving a <cr> with it.~~
UPDATE: I've forgot why i said that, but anyway after recent refactor, i thought performance had been improvement some.