aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/provider/python.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-09-14 09:38:12 +0800
committerGitHub <noreply@github.com>2026-09-14 01:38:12 +0000
commite7e29d9b6d11919c35991e843ab1de8cc4e10328 (patch)
treebb7c302d5157219adc9399529089989fd4ce9d61 /runtime/lua/vim/provider/python.lua
parent01a5fb2005d2876e6eda48c5d516c0b294c3b410 (diff)
downloadrneovim-e7e29d9b6d11919c35991e843ab1de8cc4e10328.tar.gz
rneovim-e7e29d9b6d11919c35991e843ab1de8cc4e10328.tar.bz2
rneovim-e7e29d9b6d11919c35991e843ab1de8cc4e10328.zip
vim-patch:9.2.1099: diff mode redraws slowly with many changes (#41906)
Problem: Redrawing or folding a diff with many changes is slow because for every screen line the list of diff blocks is scanned from the start. Solution: Remember the last examined diff block and resume the scan from there while the line number does not move backwards (Julien Voisin). This change is similar to v9.2.1042 (5feaa6c6c201d4d05b833a7230d07da44bf2504b) and v9.2.1036 (f1b454912996d6417acd0d738de0eb7b60902c56) quadratic behaviour replaced with a linear one by keeping track of previous ordered insertions. diff_check_with_linestatus() and diff_infold() are called for every line during redraw and fold updates, with a line number that usually increases monotonically, yet each restarted its scan at tp_first_diff. A cursor into the block list is now kept and cleared whenever a block is freed, allocated or has its line numbers shifted, so the next call continues where the previous one stopped. Scanning the diff blocks during a scroll of a 20000-line diff drops from 4.12G to 1.27G instructions with ~3300 changes, and scales with the number of changes. Tests were added as the change is non-trivial. closes: vim/vim#21256 https://github.com/vim/vim/commit/2ec2a612c7ac9315a17d70f6a2a5ea89ddaea854 Co-authored-by: Julien Voisin <julien.voisin@dustri.org>
Diffstat (limited to 'runtime/lua/vim/provider/python.lua')
0 files changed, 0 insertions, 0 deletions