From: Andreas Ericsson <ae@op5.se>
To: Andrew Cameron <andrew@worksmartlabs.com>
Cc: git@vger.kernel.org
Subject: Re: git checkout running very slowly (>12s)
Date: Thu, 16 Jun 2011 00:46:23 +0200 [thread overview]
Message-ID: <4DF9363F.6080009@op5.se> (raw)
In-Reply-To: <loom.20110615T213016-856@post.gmane.org>
On 06/15/2011 09:30 PM, Andrew Cameron wrote:
> Some git operations (notably checkouts) are taking a very long time to execute.
> Here is a shell session which illustrates the problem.
>
> $ time git branch foo
> git branch foo 0.01s user 0.00s system 77% cpu 0.016 total
Creating a branch is just a matter of creating a new ref. In this
case, you're doing it on the currently checked out ref. That's a
constant-time operation that is always very quick.
> $ time git checkout foo
> Switched to branch 'foo'
> git checkout foo 11.73s user 0.18s system 99% cpu 11.937 total
If this sequence of commands is accurate, that's a bit weird. If
you've got another branch checked out first and then switch it
would be understandable, considering the size of the repository.
We should probably still do a tree-by-tree comparison to see
which files are changed though, but I thought that's already
done to avoid superfluous work and allow worktree changes to
carry over to other branches. What version of git are you using?
> $ time git checkout master
> Switched to branch 'master'
> git checkout master 11.62s user 0.18s system 99% cpu 11.813 total
> $ git count-objects -v
> count: 953
> size: 527012
> in-pack: 153432
> packs: 7
> size-pack: 1986072
> prune-packable: 0
> garbage: 0
>
These figures are nowhere near as interesting as those from
git ls-files | wc -l
after the checkout is completed.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
next prev parent reply other threads:[~2011-06-15 22:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-15 19:30 git checkout running very slowly (>12s) Andrew Cameron
2011-06-15 22:46 ` Andreas Ericsson [this message]
2011-06-15 23:16 ` Andrew Cameron
2011-06-20 20:26 ` Andrew Cameron
2011-06-21 0:44 ` Jeff King
2011-06-21 14:34 ` Jeff King
2011-06-21 14:44 ` Andrew Cameron
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=4DF9363F.6080009@op5.se \
--to=ae@op5.se \
--cc=andrew@worksmartlabs.com \
--cc=git@vger.kernel.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.
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).