* git diff timing oddity
@ 2010-05-06 5:04 Jay Soffian
2010-05-06 5:07 ` Jay Soffian
2010-05-06 5:08 ` Jeff King
0 siblings, 2 replies; 3+ messages in thread
From: Jay Soffian @ 2010-05-06 5:04 UTC (permalink / raw)
To: git
git version 1.7.1, Mac OS X 10.6.3, largish repo (42K files, 35K
commits, well packed ~ 1GB). Difference between origin and HEAD is a
single commit.
$ time git diff --stat origin >/dev/null
real 0m0.942s
user 0m0.713s
sys 0m0.223s
$ time git diff --stat origin >/dev/null
real 0m0.944s
user 0m0.712s
sys 0m0.227s
$ time git diff --stat origin >/dev/null
real 0m0.944s
user 0m0.712s
sys 0m0.225s
$ time git diff --stat origin HEAD >/dev/null
real 0m0.022s
user 0m0.006s
sys 0m0.012s
$ time git diff --stat origin HEAD >/dev/null
real 0m0.022s
user 0m0.006s
sys 0m0.013s
$ time git diff --stat origin HEAD >/dev/null
real 0m0.023s
user 0m0.006s
sys 0m0.013s
These should be identical commands, so why is the "origin HEAD" form
running an order of magnitude faster?
j.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git diff timing oddity
2010-05-06 5:04 git diff timing oddity Jay Soffian
@ 2010-05-06 5:07 ` Jay Soffian
2010-05-06 5:08 ` Jeff King
1 sibling, 0 replies; 3+ messages in thread
From: Jay Soffian @ 2010-05-06 5:07 UTC (permalink / raw)
To: git
On Thu, May 6, 2010 at 1:04 AM, Jay Soffian <jaysoffian@gmail.com> wrote:
> These should be identical commands, so why is the "origin HEAD" form
> running an order of magnitude faster?
Because I'm an idiot. Three times I ran "origin" and thought I was
running "origin..". Sigh.
j.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git diff timing oddity
2010-05-06 5:04 git diff timing oddity Jay Soffian
2010-05-06 5:07 ` Jay Soffian
@ 2010-05-06 5:08 ` Jeff King
1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2010-05-06 5:08 UTC (permalink / raw)
To: Jay Soffian; +Cc: git
On Thu, May 06, 2010 at 01:04:18AM -0400, Jay Soffian wrote:
> git version 1.7.1, Mac OS X 10.6.3, largish repo (42K files, 35K
> commits, well packed ~ 1GB). Difference between origin and HEAD is a
> single commit.
>
> $ time git diff --stat origin >/dev/null
>
> real 0m0.942s
> user 0m0.713s
> sys 0m0.223s
>
> [...]
>
> $ time git diff --stat origin HEAD >/dev/null
>
> real 0m0.022s
> user 0m0.006s
> sys 0m0.012s
>
> [...]
>
> These should be identical commands, so why is the "origin HEAD" form
> running an order of magnitude faster?
Isn't "git diff --stat origin" comparing against the working tree?
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-06 5:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 5:04 git diff timing oddity Jay Soffian
2010-05-06 5:07 ` Jay Soffian
2010-05-06 5:08 ` Jeff King
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).