You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem here is that the file has a very very long line which is slightly larger than 800 kilobytes, containing most of its content. This essentially freezes buffer:index_line. I have tried adding a fallback implementation which switches to vim.fn.matchstrpos on very long lines because that function has a start index argument and so doesn't require repeatedly slicing a string (but has to be used as a fallback because of the cost of calling into Vimscript functions, so on typical files it is considerably slower than vim.regex:match_str), but that doesn't seem to be much of an improvement, most likely because Lua strings have to be recopied as Vimscript strings. I think this is a good argument in favor of introducing an option like max_line_length which would set the max number of characters (not bytes since blindly slicing on bytes can create invalid UTF from multibyte characters) in a line which will be used by the indexer, and setting it to something like 40 kilobytes by default. I can make a PR.
after enable cmp-buffer, when I modify a 800k config file is very slow. nvim cpu is 100%
Corefile.zip
The text was updated successfully, but these errors were encountered: