-
-
Notifications
You must be signed in to change notification settings - Fork 619
Very slow on exit neovim #2438
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
Comments
I can't replicate it (in sense that I have never experienced that before). Is the delay present without any open buffers as well? |
when I delete all buffer manually before exit, the issuse still present. |
This comment was marked as duplicate.
This comment was marked as duplicate.
Tried unsuccessfully with minimal config and linux source: Your video shows that you are using plugins other than specified in the minimal config. Please reproduce with the minimal config as instructed: "Clean Room" Replication Please enable Diagnostic Logging after reproducing with |
There is no other plugins, the top line of video was the tmux panel list. I tried to reproduce on a fresh linux virtual machine this morning but failed. It seems that I can only replay the issue on my iMac. After delete some nvim-tree setting, the necessary settting are: require("nvim-tree").setup {
update_focused_file = {
enable = true,
},
git = { ignore = false },
} Either set Here is another video: iShot_2023-10-02_12.22.42.mp4 |
Is the iMac old / slow? Was the VM on that iMac? It seems the issue could be:
Diagnostic Logging will shed some light on this. |
Unrelated, however you can get some significant OSX git performance gains Git fsmonitor Daemon |
I can reproduce on M1 Macbook air(macOS 12.6.5 ) too. |
Without logs or being able to reproduce there's no path forward here. @gegoune could you attempt a replication? |
I can reproduce this and neovim just hangs after I did a |
@alex-courtis Didn't get a chance yet. |
This looks like #1931 The combination of gitignore and the MacOS git fs monitor daemon worked in that case.
Ah... that one was silently migrated to Raised #2468 as it may be unrelated. |
We need logs (see above) to continue @overcache , @GZLiew |
@alex-courtis ignoring {
|
here it is: steps which genrate logs above:
|
This is useful, thank you for digging. It looks like it's simply the number of folders. Let's fix #2468 and see how it goes. |
#2468 has been resolved. @overcache Would you mind updating nvim-tree to check if issue still persists? |
still persists with 05f55c1 |
I think your neovim is debug mode. |
no, it's not. ❯ nvim --version
NVIM v0.9.4
Build type: Release
LuaJIT 2.1.1700008891
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.4/share/nvim"
Run :checkhealth for more info |
Hm... It is only for nvim-tree? I don't know it is nvim-tree's problem or not. |
@overcache this was actually an easy fix for me I digged into the source and found local function is_folder_ignored(path)
for _, folder in ipairs(IGNORED_PATHS) do
if vim.startswith(path, folder) then
return true
end
end
for _, ignore_dir in ipairs(M.config.filesystem_watchers.ignore_dirs) do
if vim.fn.match(path, ignore_dir) ~= -1 then
return true
end
end
return false
end so all I had to add in my config was filesystem_watchers = {
enable = true,
debounce_delay = 50,
ignore_dirs = {
"node_modules"
},
}, and now my nvim instantly closes without any delay |
@alex-courtis I guess this is a feature request whether we can add gitignore to config |
That sounds reasonable. Yes, we can add I'll close this one as we can track it in there. |
thanks, it works |
Description
I've noticed that when I exit Neovim, it's extremely slow, often hanging on the :qa command for 5 seconds or even longer before the Neovim instance finally quits. After individually removing plugins, I eventually identified that nvim-tree was the cause of this issue.
Neovim version
Operating system and version
macOS12.1, Darwin macbox.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 x86_64
nvim-tree version
934469b
Clean room replication
Steps to reproduce
cd webpack
:e package.json
:NvimTreeFindFile
:e node_modules/semver/bin/semver.js
:qa
, neovim will hang 3~5 secondsExpected behavior
:qa
execute then neovim quit quickly.Actual behavior
quit:
:qa
, neovim will hang 3~5 secondsThe text was updated successfully, but these errors were encountered: