Closed fitrh closed 3 years ago
Not sure why this happens. I did not manage to reproduce properly because my computer's too fast. Could you tell me which commit caused the issue ?
I think since the last commit of neovim, recently i just rebuild my neovim with the latest commit and also update this plugin, the problem still remains, but now, a little bit faster, and it's only happens with :wq
, for now, i just stick with :w
then :q
.
This is what is looks like from the latest commit of neovim
i meant which commit of nvim-tree introduces this anomaly ?
I think it's 86944b51c0e0a8fed5a02ab44640b2b215cebe93, but, isn't that just a renaming ?
don't think it should change anything related to saving. There might be an issue with some async stuff on buf change.
I'm having the same issue. When nvim-tree is loaded, it takes a long time to write a file for the first time in a given session, but the following :w work as expected. For me, nvim freezes on :w as well :wq.
In any case, thank you for developing nvim-tree! Aside from this issue, it's the best explorer plugin I've ever used.
thanks @PeSader :) yes i've seen this happening too on my other computer, i might just push a fix when i have some time
I had similar issue with vim-startify and g:nvim_tree_follow set to True. For me setting g:nvim_tree_follow to False fixed the issue.
I had similar issue with vim-startify and g:nvim_tree_follow set to True. For me setting g:nvim_tree_follow to False fixed the issue.
Try this on my build, but the issue still exist
if someone wish to debug this issue, because i'm quite busy at the moment and will not be able to work on this project for at least a month or so.
should be fixed in latest master, can you confirm ?
Thank you, it's fixed in my machine, can you tell me which commit is that ? i see there are 3 commit from you.
it's been fixed in 42a875aa006239d5b688f56ac37ff58c5aab1b69
!
I am not sure if this issue got reintroduced again. Couple weeks back, all was working normal. But recently I have observed very slow startup time, file update/save takes lot of time if I enable this plugin. Issues looks similar to what mentioned in this thread.
I've seen that too, not sure which commit introduced this but i've got quite a few features submissions lately which might have introduced some lag.
although startup time should not be that high, i did not notice anything strange during startup.
No sure but I am consistently able to reproduce startup time delay (and it is so much noticeable ;)) by enabling/disabling nvim-tree plugin.
just did some debugging, without nvim-tree, when :qa
nvim still freezes for half a second so it does not come from this plugin.
also did some benchmark on most functions:
and haven't seen any lag, all those values are quite fast, debugging for 1/2h i've seen at most 15ms for refresh. So i don't think the lags come from nvim-tree, i'll do some more debugging to see where it comes from
ok for me, the efm
setup for nvim-lspconfig is the culprit of my :qa
huge lag.
could you try #278 and tell me how long the init calls take to run on your machine ?
There is a known bug. with older version of efm-langserver which causes delay on disconnect. Updating to 0.0.28 should resolve it.
Tried #278, same result, my startup hungs when plugin is enabled. Below images show difference of almost 8 seconds
Without plugin:
With Plugin:
I am using
NVIM v0.5.0-dev+nightly-71-g48e805728
And this nvim config as is : https://github.com/ChristianChiarulli/nvcode
Above difference is just by commenting out 'kyazdani42/nvim-tree.lua'
line from plugins.lua
file
There is a known bug. with older version of efm-langserver which causes delay on disconnect. Updating to 0.0.28 should resolve it.
Tried this but same result.
it uses packer so i believe once you've commented out, you need to :PackerCompile
to properly reload the config.
I've never seen such startup times, and this plugin is really doing nothing special. If you can pinpoint the culprit in the configuration i'd be happy to fix this.
what kind of specs do you have ? My machines might be too powerful thus i'm not distinguishing any lag ^^'
what kind of specs do you have ? My machines might be too powerful thus i'm not distinguishing any lag ^^'
I have MacBookPro, 8 Core i9, 32 GB Memory 😉
this plugin should definitely not be the one to do the lag. 6second is way too much. What neovim version are you running ?
this plugin should definitely not be the one to do the lag. 6second is way too much. What neovim version are you running ?
NVIM v0.5.0-dev+nightly-71-g48e805728 Build type: Release LuaJIT 2.1.0-beta3
could you reproduce the lag with a minimal configuration ?
Following init.lua
script reproduces this on my machine
local execute = vim.api.nvim_command
local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path)
execute 'packadd packer.nvim'
end
local my = function(file) require(file) end
vim.cmd 'autocmd BufWritePost plugins.lua PackerCompile' -- Auto compile when there are changes in plugins.lua
require('packer').init({display = {auto_clean = false}})
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use 'kyazdani42/nvim-tree.lua'
end)
can definitely not reproduce :( my luajit version is 2.0.5, would that change something ?
can definitely not reproduce :( my luajit version is 2.0.5, would that change something ?
Somehow its failing to install on my machine with following error :(
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried this on virtualbox, and everything works perfect.
Could this be OS specific. I am observing slowness on following configuration:
Turns out, somehow my fish variables file had almost 900 lines agains fish user path variable. That was causing nvimtree
to render pretty slow. Not sure nvim tree somehow uses use shells path?
@kyazdani42 If you dont see any other issue, this can be closed, thanks for the quick replies.
i tried fish but it did not change anything, maybe you are using it inside neovim (which is not a good idea) ? what is the output of :set shell?
after you launch neovim ?
maybe you are using it inside neovim (which is not a good idea) ?
Is it so, I had no idea, do you have any pointer where I can read more.
what is the output of
:set shell?
after you launch neovim ?
Yes, its fish. But after I reset entire fish settings, I am not observing much lag though.
well you should not use fish as neovim base shell, it might break plugins that use shell commands :) just set shell=/bin/bash
or something like that in your nvim config would then solve this. Also fish is quite slow as a shell for executing commands, this is why maybe git commands would take some time to spawn in comparison with a raw bash shell which is quite fast.
well you should not use fish as neovim base shell
Only nvim-tree have this performance issue. And using bash does not solve this at all.
i have these 'performance issues' only running the fish shell, or in huge git directories with lots of changes. Running git commands sometimes take 2/3 seconds even in a raw shell, all you can do is waiting for the refactoring of git running through jobs instead of system function calls.
I'm getting this performance problem using bash in a clean git repo :/
I have 3 seconds hang on startup and saveing. fish and bash behave same. It's related to git and disappears after I disable the git icon.
let g:nvim_tree_show_icons = {
\ 'git': 0,
\ 'folders': 0,
\ 'files': 0,
\ 'folder_arrows': 0,
\ }
So there may be some blocking git function in this plugin?
@tkkcc It strangely worked really well here :thinking: thanks, seems to be some blocking git func
check #549, if this cannot help you, i wont be able too i'm afraid :/ there will be releases that address performance for integrations in the future.
set shell=/bin/bash
Works for me
https://user-images.githubusercontent.com/55179750/104080690-78185580-5264-11eb-9bc2-49b7fa66b781.mp4
This is suddenly happen and i don't know what caused them, save and quit (
:wq
) a changed file give some delay, after disable this plugin, it back normal again. But this is not happen if doing save(:w
) and quit(:q
) separately. I use the default configuration fromREADME
.