Closed ces42 closed 6 months ago
Actually the tracing profiler I used might be exaggerating the impact of vim.split
a bit here. I tried using a sampling profiler and vim.split
still shows up a lot but it's maybe only 10-15%. I still think it's worth avoiding it in the hot loop though.
Thanks
vim.split
itself isn't the problem, it's vim.validate
. Validate is super slow. I made a new release that is using vim.split
without validate now.
Problem
This plugin is kind of slow, and one of the reasons seems to be a slow function call to
vim.split
inside the hot loop on line 45 oflua/ibl/indent.lua
: https://github.com/lukas-reineke/indent-blankline.nvim/blob/12e92044d313c54c438bd786d11684c88f6f78cd/lua/ibl/indent.lua#L41-L49I have no idea why this is slow, but here's a profile (using profile.nvim)![image](https://github.com/lukas-reineke/indent-blankline.nvim/assets/19842517/f1ff8890-fbb6-4141-b1a0-6a271e856610)
Each call to
vim.split
is taking ~0.1 ms for every line on the screen, several times per second.Neovim version (nvim -v)
0.10.0 commit f6042d5c300c00