-
-
Notifications
You must be signed in to change notification settings - Fork 617
Significant lag on start #453
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
same as i |
what tree are you currently using? I've been using a combination of Leexplore and telescope file search. |
cannot reproduce with the config provided, this might be related to your shell (better to set shell=/bin/bash or some fast shell with low configuration when using neovim if you want to avoid perf issues with plugins) |
Interesting, never thought of shell setting. Would rather want to keep my fully configured shell for terminal buffers. Are you saying that each git command nvim-tree executes spawns full shell instance? |
currently I'm using the dash shell for /bin/sh and zsh for my shell. I tried bash for both bin/sh and my default shell, lag still persists. |
Hum i had someone with this issue before and he had issues with fish which made the whole tree laggy. I guess when you run system for git commands, it gets slower. |
i might just make the git stuff asynchronous, it might fix number of lag issues |
Instant tree with got status showing moments after would be absolutely fine and probably even preferable for me. Just a personal opinion. |
just implemented that in b31003e, could you guys tell me if it changes something ? |
Still lags just as bad for me. |
I cannot remember now what startup time for nvim-tree was before, I am not seeing significant differences between commit above and master, but it[s starting pretty fast for me now. |
It changed it but no where near what I would consider usable. |
@asmallcarrot could you try disabling git integration fully and tell me if the lag persist ? |
I went through the readme and was unable to find out how to. |
I disabled git integration, no difference in lag. |
@asmallcarrot @kyazdani42 Not sure if it's the same issue, but for my specific case, I could reproduce and it is indeed git causing the lag. When working on a massive git repo (~1mill files):
there is a very noticeable delay on startup (after first paint, but before keypresses register),.. I haven't had time to debug this, but
As a quick test, replacing the contents of
fixes the ~5-10s noticeable delay. edit: PR added to fix usage of git when not configured #499 |
@asmallcarrot closed by mistake, is this issue fixed for you ? |
It's better but still takes about 5 seconds to open a file. |
can you reopen this issue? |
Just updated to the newest version of nvim, and compiled from source. no luck. |
not sure what i can do here i can definitely not reproduce this issue :/ |
I've found that a significant source of slowness at startup is that nvim-tree runs an expensive
If I disable nvim-tree, the
I think I can work around this by lazy-loading nvim-tree the first time I run one of its commands or hit a mapping, but I haven't tried that yet. |
Because, as reported here: nvim-tree/nvim-tree.lua#453 (comment) it is adding about 40ms to startup time. I'm sure it adds much less on a faster machine, but on this one (6-year-old, thermal-throttling, summer-afflicted laptop), it is accounting for about 25% of startup time.
For me we are talking about minutes instead of seconds in a special case. I'm managing windows configuration files the same way as dotfiles for linux, and use the WSL2 version of git for doing that, which means that access to the Windows file system is really slow. So
Without the
Normally I don't open the repository in neovim, but when doing a git commit, the editor hangs for around 4 minutes, which first made me think that something had frozen totally. It also took some time to time to track down to this issue. I didn't suspect that the issue was with Disabling the git functionality fixes the issue, but I don't want to disable it for my other repositories, since it's quite useful. I guess it should ideally load the status in the background, or at the very least, load it only when you open the explorer view. |
closing this in favor of #549 |
Issue:
After a clean install of the latest version of nvim and no other plugins when I install nvim-tree.lua it takes ~1-2 seconds for me to be able to do any actions in a document. The document renders but I can not for example move my cursor.
System info:
OS: Artix w/ openrc
Terminal: ST
Nvim Version: v0.5.0-dev+1416-gec7b21918 (I tried the AUR version and built from source)
Start time log
This log doesn't appear to show the lag
File Structure
Recreating
nvim config folder:
init.lua:
lua folder:
plugins.lua:
Without Plugin
WithoutPlugin.mp4
With Plugin
WithPlugin.mp4
The text was updated successfully, but these errors were encountered: