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:
pgpHv2HhNKXw4.pgp
Description: OpenPGP digital signature