Description
Update 20221217
If you experience performance issues please look at wiki : Troubleshooting and raise a new bug report if you still experience issues.
20221108
Hello, please don't make yet another issue or comment an existing issue regarding huge lag
in nvim-tree.
Please see performance-issues in the README.
If your editor start to lag when using nvim-tree, it might be because of several things:
- you are using fish as an editor shell (which might be fixed in the future), try
set shell=/bin/bash
in your vim config. - you are running in a git directory with lots of changes:
- try running
git status --porcelain=v1 --ignored=matching -u
and see if it hangs for a while. If it does, try disabling the git integration all by itself:
- try running
-- this is lua code (in `init.lua`)
require'nvim-tree'.setup {
git = {
enable = false
}
}
I have to disclaim that the git status handling will never be fast on huge directories (trying to run the command above with GIT_DIR set did take a few 16seconds on my machine).
The data returned is really heavy and slows down the editor just by itself (loaded 40 to 80mb just of git status text, which can represent 300 or more MB of data in ram which slows down the nvim process).
Usually, it works fine on most repositories, but will probably slow down sometimes.
Alternatively, each git process is now discarded after a configured timeout which is 400ms
by default. This is configurable in
require'nvim-tree'.setup {
git = {
enable = true,
timeout = 400 -- (in ms)
}
}
Thank you all for reading this.