Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
VCS_info seems really slow on remote filesystem
- X-seq: zsh-workers 44899
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: VCS_info seems really slow on remote filesystem
- Date: Thu, 7 Nov 2019 19:41:13 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=vVZyxLbTX7LIjzhdd+T6fWXWc8QdE/MyY22/ohtzbog=; b=LPKpG7PafWmUP8rzqMtQnPQ5mAVYMEENWZNbxucOVlGCcf+g54qMI19xViNgz1E6cP TLGHFxXj3ZCOaLjmp8ib2ukjSftIDVuvj4lb1wm7lwEJp9e3LHKZ469di5qORk0KqSQ7 Dg2HkvbyOqN4hkrCvWm4cRoiiQR7+l2Hrfg9oKHLhGxwHH/+iptgAIzbRt4W5tT0qHZQ JYUeU23kZbhzh7cCdGCsA/eSou5Xm6mlSsGbWB9a3HN8sz60i0UrLjDDFAuqU1Lm4cJX 4NDrkOC0/txFUjHF6U5EnwVymc/meRpV/CChUiFGd9qSAr1935KqrSknhSMufNeHhosJ nxvQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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