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

VCS_info seems really slow on remote filesystem



I've been invoking vcs-info from a precmd hook and using the
git-post-backend-updown hook to update my prompt.  Recently I started
using what amounts to a WAN-mounted file system, and find my prompt
takes a couple of seconds to redraw after each command.

After some fiddling around to enable function tracing I discovered
that VCS_INFO_detect_git is trying two different "git rev-parse" calls
and also looking for two subdirectories, and that
VCS_INFO_git_getbranch is looking for five more directories and four
files.  Those directory/file existence tsts are all slow operations on
this filesystem, and in at least some of the cases appear to be tests
that would only need to be done if the current directory changed?

Is there anyone more familiar than I with the implementation than I,
who could determine whether any of this information could be cached
instead of being regenerated on every precmd?

(I've seen gitstatus recommended in another thread, but it's not
feasible to install the binary daemon in the circumstances where I'm
encountering this.)



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