Skip to content
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

Lag on some directories during navigation #17

Open
rcdosado opened this issue Jan 16, 2018 · 7 comments
Open

Lag on some directories during navigation #17

rcdosado opened this issue Jan 16, 2018 · 7 comments

Comments

@rcdosado
Copy link

there's a significant delay whenever i navigate my home directory inside nerdtree, i guess this is due to lots of folders on my directory?, its working fine on small number of directories though

@kaminooni
Copy link

I'm also encountered a lot of freezes with this plugin. Especially in large directories (like node_modules).

@kutsan
Copy link

kutsan commented Feb 20, 2018

vim's syntax feature and regex engine known to be slow. This plugin creates bunch of syntax items and highlight them when one of them is found with regex. Since this vim's problem, sadly I don't think this issue can be solved without patching vim itself.

You can disable the cursorline completely, it makes vim try to update syntax items much less. That can reduce the lag.

augroup nerdtreedisablecursorline
	autocmd!
	autocmd FileType nerdtree setlocal nocursorline
augroup end

@cevhyruz
Copy link

cevhyruz commented Oct 6, 2018

Any update on this?

@Zarathustra2
Copy link

Zarathustra2 commented Jan 16, 2019

Just put let NERDTreeHighlightCursorline = 0 in your .vimrc - as stated in the readme.md - which results in the same as kutsan's solution.

This should fix the lag, at least it did it for me.

@174n
Copy link

174n commented Mar 15, 2019

try set lazyredraw

@vegerot
Copy link

vegerot commented Apr 10, 2020

Sorry for the bump, but are we downvoting @Rundik because his solution didn't work, or because it was a bad compromise?

@Vlek
Copy link

Vlek commented Jun 15, 2020

I was wondering what could be the problem and it might be that it's using an array for the allowed extensions. Because of this, for each file, it will have to do ~n/2 checks to see whether the extension is allowed or not. Instead, if it was in a dictionary like the colors that are associated with the filetypes, then that may significantly speed up the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants