Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaderfbuffer got very slow when some large files open #1079

Closed
2 of 6 tasks
zhyzky opened this issue Jun 14, 2024 · 5 comments
Closed
2 of 6 tasks

Leaderfbuffer got very slow when some large files open #1079

zhyzky opened this issue Jun 14, 2024 · 5 comments

Comments

@zhyzky
Copy link

zhyzky commented Jun 14, 2024

  • vim or neovim?
    • vim
    • neovim
  • Output of vim --version or nvim --version: 9.0
  • Output of :echo has("python"): 0
  • Output of :echo has("python3"): 1
  • Output of :echo &pythondll(only vim, not neovim):
  • Output of :echo &pythonthreedll(only vim, not neovim):
  • Output of :py print(sys.version):
  • Output of :py3 print(sys.version): 3.10.12
  • Output of :echo g:Lf_Debug_Cmd:
  • Output of :echo g:Lf_FilesFromCache:
  • Operating system:
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Configurations related to LeaderF in vimrc:
    let g:Lf_ShortcutF = "noexistkey"
    let g:Lf_ShortcutB = "noexistkey"
    let g:Lf_WindowPosition = 'popup'
    let g:Lf_StlSeparator = { 'left': '', 'right': '' }
    let g:Lf_HideHelp = 1
    let g:Lf_UseCache = 0
    let g:Lf_UseVersionControlTool = 0
    let g:Lf_IgnoreCurrentBufferName = 1
    let g:Lf_PreviewInPopup = 1
    let g:Lf_PreviewResult = {'Function': 0, 'BufTag': 0 }
    let g:Lf_WorkingDirectoryMode = 'Ac'

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
Copy link
Owner

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

@Yggdroot
Copy link
Owner

I created an issue vim/vim#15006.

@zhyzky
Copy link
Author

zhyzky commented Jun 16, 2024

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 added a commit that referenced this issue Jun 16, 2024
@Yggdroot
Copy link
Owner

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

@zhyzky
Copy link
Author

zhyzky commented Jun 16, 2024

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

Thanks for your work. But really little speedup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants