mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Question about the ahead-behind computation and status
@ 2017-12-14 21:49 Jeff Hostetler
  2017-12-15 10:08 ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Hostetler @ 2017-12-14 21:49 UTC (permalink / raw)
  To: Git Mailing List, Junio C Hamano, Jeff King, Ben Peart,
	Jameson Miller, Derrick Stolee

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 ???


[*] Sadly, the local repo was only about 20 days out of
     date (including the Thanksgiving holidays)....

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

end of thread, other threads:[~2017-12-15 19:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14 21:49 Question about the ahead-behind computation and status Jeff Hostetler
2017-12-15 10:08 ` 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

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

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