From: "Suraj N. Kurapati" <sunaku@riseup.net>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PR] vcs_info-examples: optimize +vi-git-untracked() #76
Date: Mon, 28 Jun 2021 15:57:36 -0700 [thread overview]
Message-ID: <20210628155736.6982862a@ratham> (raw)
In-Reply-To: <CAN=4vMp1MAi8ncK3n9V95m0AcE=jTG6qbYr+eRYVpWrsEMBY8Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 727 bytes --]
On Sun, 27 Jun 2021 15:03:17 +0200, Roman Perepelitsa wrote:
> On Sun, Jun 27, 2021 at 8:07 AM Suraj N. Kurapati wrote:
> > Speed up the prompt on large and/or deep working directories [...]
>
> Do you have an estimate of the speedup? Numbers from at least one
> repository on one machine would be useful to see.
I see a 4x speedup on a large Git-enabled home directory, as follows:
$ time (git status --porcelain | wc -l)
212
0.01s user 0.02s system 0% cpu 9.021 total
$ time (git status --porcelain | grep '??' &>/dev/null)
0.01s user 0.02s system 0% cpu 12.294 total
$ time (git status --porcelain | grep -q '^?? ' 2>/dev/null)
0.01s user 0.01s system 0% cpu 3.097 total
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]
next prev parent reply other threads:[~2021-06-28 22:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-27 6:09 Suraj N. Kurapati
2021-06-27 9:13 ` Oliver Kiddle
2021-06-27 10:04 ` Frank Terbeck
2021-06-28 17:16 ` Suraj N. Kurapati
2021-06-27 13:03 ` Roman Perepelitsa
2021-06-28 22:57 ` Suraj N. Kurapati [this message]
2021-06-29 7:16 ` Roman Perepelitsa
2021-08-04 8:55 ` Roman Neuhauser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210628155736.6982862a@ratham \
--to=sunaku@riseup.net \
--cc=roman.perepelitsa@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).