Yggdroot / LeaderF

An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
Apache License 2.0
2.14k stars 180 forks source link

Leaderfbuffer got very slow when some large files open #1079

Closed zhyzky closed 2 months ago

zhyzky commented 2 months ago

Describe your question, feature request, or bug.

When vim has several large files (>100M) open, the leaderfbuffer got very slow. It seems this command would excute some file open operation, while the file already loaded.

Steps to reproduce

  1. Just load several large files
  2. Execute leaderfbuffer and wait

Actual behaviour

The buffer navigation should not be slower than it is inside vim.

Expected behaviour

Somooth navigation between buffers.

Yggdroot commented 2 months ago

yes, because vim's popup window is not so good. Neovim would be faster.

Yggdroot commented 2 months ago

I created an issue https://github.com/vim/vim/issues/15006.

zhyzky commented 2 months ago

yes, because vim's popup window is not so good. Neovim would be faster.

According to vim help, popup_create function allow buffer number being the first parameter. This can speedup the buffer oppenning. I think the real problerm is when navigate the buffer, getbufline is too slow.

Yggdroot commented 2 months ago

I modified the code that we can only preview 4096 lines. This may speedup the preview.

zhyzky commented 2 months ago

I modified the code that we can only preview 4096 lines. This may speedup the preview.

Thanks for your work. But really little speedup.