PlugDiff much slower in vim compared to neovim (while PlugUpdate is equally fast).
Hello,
I'm a vim user, and PlugUpdate works equally fast in vim compared to neovim, which is great. However PlugDiff is much slower in vim, by a factor of 8-9, as opposed to neovim where it is almost instantaneous.
Is this something that could be fixed? I'm using vim 9.1.1230, neovim 0.10.4 and git 2.47.2 on debian unstable, with the latest vim-plug. Vim is compiled with +python3 +ruby +vim9script.
Greetings,
jgb
nvim goes brr
However PlugDiff is much slower in vim, by a factor of 8-9, as opposed to neovim where it is almost instantaneous.
In my case, it is faster in Neovim, but it's not like by a factor of 8-9, but somewhere around 1.5 and 2.
let a = reltime() | PlugDiff | echom reltimestr(reltime(a))
- Vim: 3.225016
- Neovim: 1.912065
How long does it take on your system?
@junegunn Hello,
tested it now:
- neovim: 0.359486
- vim: 0.521084
- gvim: 5.622875
So it seems it's actually specific to gvim, not vim! The results are reproducible. Something must happen which is somehow very slow in gvim?
It's a pity because I drive gvim full time, not vim or neovim :)
Let me know if there's anything else I can try...
Greetings,
jgb
Can you see a similar trend in this?
let a = reltime() | echom map(range(50), 'system("echo ".v:val)') | echom reltimestr(reltime(a))
let a = reltime() | echom map(range(50), 'system("echo ".v:val)') | echom reltimestr(reltime(a))
- neovim: 0.056979
- vim: 0.192386
- gvim: 2.608553
So yes it seems the trend is similar!
Hm... It seems command prompt window cost. I think job API does not have the problem.
I can also confirm it's definitely slower in MacVim. 3.3 seconds.
Thanks @Shougo for the comment. If you're right, we could write a custom system function that internally uses job API if available, and use it instead of the system.