Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: git completion really slow in a big repo



Anyone know the solution about this ?
Another question is if I can't bear the slowness of git completion, how could I turn that off in .zshrc ?

Thanks,
Ryan

2009/7/6 Ryan Ye <yejianye@xxxxxxxxx>
I am using zsh 4.3.10. When I type 'git checkout master-<TAB>', the completion for the rest of the branch name is really slow (take more than 15 secs).
When I use strace to log all system calls in the completion, I found zsh access all the files in all sub dirs under current working directory. Because I'm executing the command at the root of my tree, there're more than 10,000 files, which really slows things down. To prove that's the cause of the problem, I cd into a leaf directory and do 'git checkout master-<TAB>' again. This time the completion finishing in less than one sec.

So my question is that why a git checkout need reading the full file list under a directory? it's unacceptable for a large tree. Is there any options I could tweak to change this behavior ?

Thanks,
Ryan



Messages sorted by: Reverse Date, Date, Thread, Author