diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-07-11 08:57:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-11 08:57:55 +0800 |
commit | 19fb573ad992b6f658b58159314eeea0c2f30953 (patch) | |
tree | 5d394c657fb5f9d0abe0e1315b54b66914aeefe8 /runtime/lua/vim/lsp/buf.lua | |
parent | db8fe63a9398efd57c3ff28aa3d93e45fb70ee1a (diff) | |
download | rneovim-19fb573ad992b6f658b58159314eeea0c2f30953.tar.gz rneovim-19fb573ad992b6f658b58159314eeea0c2f30953.tar.bz2 rneovim-19fb573ad992b6f658b58159314eeea0c2f30953.zip |
perf(extmarks): avoid unnecessary marktree traversal with folds (#24306)
Extreme testcase:
```lua
vim.cmd([[
call setline(1, ['', '', ''])
2,3fold
]])
local ns = vim.api.nvim_create_namespace('')
for _ = 1, 100000 do
vim.api.nvim_buf_set_extmark(0, ns, 1, 0, { virt_lines = {{{ '' }}} })
end
local start_time = vim.uv.hrtime()
vim.api.nvim_win_text_height(0, {})
local stop_time = vim.uv.hrtime()
print(stop_time - start_time)
```
Before this PR: 21542011
After this PR: 43874
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
0 files changed, 0 insertions, 0 deletions