zsh-workers
 help / color / mirror / code / Atom feed
* VCS_info seems really slow on remote filesystem
@ 2019-11-08  3:41 Bart Schaefer
  2019-11-08  4:00 ` Bart Schaefer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bart Schaefer @ 2019-11-08  3:41 UTC (permalink / raw)
  To: Zsh hackers list

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.)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-08 10:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08  3:41 VCS_info seems really slow on remote filesystem Bart Schaefer
2019-11-08  4:00 ` Bart Schaefer
2019-11-08 10:24 ` Daniel Shahaf
2019-11-08 10:32 ` Roman Perepelitsa

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).