From: Jeff Hostetler <git@jeffhostetler.com>
To: Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
Ben Peart <peartben@gmail.com>,
Jameson Miller <jameson.miller81@gmail.com>,
Derrick Stolee <stolee@gmail.com>
Subject: Question about the ahead-behind computation and status
Date: Thu, 14 Dec 2017 16:49:31 -0500 [thread overview]
Message-ID: <030bf57c-7a23-3391-4fc0-93efee791543@jeffhostetler.com> (raw)
We working with the (enormous) Windows repo, we observed
a performance problem in the ahead-behind computation and
were considering a few options.
We had a local repo with a local branch that was 150K
commits behind the upstream branch[*]. There was a ~20
second different in the run times for these 2 commands:
$ git status --porcelain=v2
$ git status --porcelain=v2 --branch
Profiling showed the additional time was spent computing
the ahead/behind values for the branch. (The problem is
not specific to porcelain V2, that was just the command
where we discovered it; for example, there is a similar
perf problem in "git branch" vs "git branch -vv".)
I don't want to jump into the graph algorithm at this time,
but was wondering about adding a --no-ahead-behind flag (or
something similar or a config setting) that would disable
the a/b computation during status.
For status V2 output, we could omit the "# branch.ab x y"
line. For normal status output, change the prose a/b
message to say something like "are [not] up to date".
Thoughts or suggestions ???
Thanks,
Jeff
[*] Sadly, the local repo was only about 20 days out of
date (including the Thanksgiving holidays)....
next reply other threads:[~2017-12-14 21:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 21:49 Jeff Hostetler [this message]
2017-12-15 10:08 ` Question about the ahead-behind computation and status Jeff King
2017-12-15 15:08 ` Jeff Hostetler
2017-12-15 15:43 ` Derrick Stolee
2017-12-15 18:30 ` Junio C Hamano
2017-12-15 19:40 ` Derrick Stolee
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=030bf57c-7a23-3391-4fc0-93efee791543@jeffhostetler.com \
--to=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jameson.miller81@gmail.com \
--cc=peartben@gmail.com \
--cc=peff@peff.net \
--cc=stolee@gmail.com \
/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://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).