-
Notifications
You must be signed in to change notification settings - Fork 11
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
Startup very slow when using fish as shell #38
Comments
Oof, this is bad, is this milliseconds? With which command did you get this number? The terminal emulator does not really have much impact, and even if it had, kitty is one of the faster terminals. Most of this plugins time on startup is spent on spawning the asynchronous background tmux statusline updater process. Usually this should be fast, but it depends on your operating system. But of course this is just speculating in the dark, it is better if I profile this. Could you perhaps share your entire vim config (or at least the options set for this plugin), and your operating system, so that I can try to reproduce this? P.S.: If you are using Windows, then process creation is very slow in general so I am not sure if we are able to fix this if you are on Windows. |
Sorry, I forgot to specify it, but the OS is Ubuntu 20.04. So the profiler I used is from hyiltiz/vim-plugins-profile, but I tried with yours and it gives similar result (372.82). You can find my nvim config here. In particular, my statusbar is set to: local function status_line()
local status = " %{%get(b:,'gitsigns_status','')%}"
status = status .. '%=%#GreyStatusLine#%{luaeval("NvimGPS()")}'
status = status .. '%=%h%#RedStatusLine#%m%#BlueStatusLine#%r%#StatusLine# %F ▏%2c'
return status
end
.
.
.
vim.o.statusline = status_line() I tried to only set it to the last statement, (ignoring gitsigns and NvimGPS), but it is still the same. When trying the plugin, I set the config for TMUX according to what you suggest in the |
I tried your config in a Docker container, and I still cannot reproduce ( So it must be something else. nvim --cmd 'profile start profile.log' --cmd 'profile func *' --cmd 'profile file *tpipeline*' Then quit nvim immediately after starting and upload the file With that info, I should be able to see what's going on with your setup. |
Here it is: profile.log. So from what I understand, it would be caused by Edit: It seems to also take time for |
Yeah, so apparently calling What does vim output when you enter It would be interesting to find out why they are slow on your computer. But longterm I want to get rid of that last remaining blocking |
So I investigated further for 2 other things:
The machine I ran the tests on has 64G RAM, so I hardly see a memory problem. Finally, here is the output of
and
I wonder why these calls are so slow. Could it be due to the fact that I use an AppImage for the Edit: I tried with a traditional binary and it is still the same. |
Very weird indeed, some googling seems to confirm this is a common issue when using vim with fish:
Apparently the fix is to set the shell in vim to
Does this fix the issue? |
Indeed it does! It now drop to ~2.7 ms for the plugin (still due to those calls, but that is now in a reasonable range). Thank you for taking the time to debug that with me even if it was not related to this particular plugin, although it is the first time that issue manifest itself despite having tried a lot of plugins. |
Good to hear that it resolved the issue for you. :) Still I think ~3ms is a little bit too much, I will see if I can get rid of that last remaining blocking call as well. |
Can you please pin this issue or add it to the README? I almost removed this plugin because the latency it added haha though the functionality it provides is great! |
|
Describe the bug
The use of this plugin drastically reduces the speed of opening and closing files in (n)vim. I use
Kitty
as the terminal emulator and was wondering if using, for example, Wezterm would improve that. Otherwise, what could/does cause that?TMUX 3.3a;
Kitty 0.26.4;
NVIM v0.9.0-dev-124-gbd7ca10fd;
Using a profiler:
To reproduce
No response
Expected behavior
No response
Terminal emulator
Kitty
Debug output
No response
The text was updated successfully, but these errors were encountered: