git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: git@vger.kernel.org
Subject: q: git-fetch a tad slow?
Date: Mon, 28 Jul 2008 18:01:38 +0200	[thread overview]
Message-ID: <20080728160138.GA12777@elte.hu> (raw)


here's another possibly stupid question.

Setup/background: distributed kernel testing cluster, there's a central 
box with a git repo of the kernel, and lots of of testboxes that track 
that repo over ssh transport. In each "iteration" a random kernel config 
is generated, built and booted, and the booted up kernel is checked. 
Performance of each iteration matters to total testing throughput, so i 
try to optimize the critical path.

Problem: i noticed that git-fetch is a tad slow:

  titan:~/tip> time git-fetch
 
  real    0m2.372s
  user    0m0.814s
  sys     0m0.951s

There are hundreds of branches, so i thought fetching a single branch 
alone would improve things:

  titan:~/tip> time git-fetch origin master

  real    0m0.942s
  user    0m0.285s
  sys     0m0.109s

But that's still slow - so i use a (lame) ad-hoc script instead:

  titan:~/tip> time tip-fetch

  real    0m0.246s
  user    0m0.024s
  sys     0m0.019s

... which ssh's to the repo to check tip/master by hand:

  HEAD=$(git-log -1 --pretty=format:"%H" HEAD)
  RHEAD=$(ssh server "cd tip; git-log master -1 --pretty=format:'%H'")
  [ "$RHEAD" != "$HEAD" ] && {
    [...]
  }

... which script is lame/expensive on multiple levels but still is much 
faster.

I'm wondering, am i missing something obvious? It seems most of the 
overhead is local CPU overhead, so it's something in Git's domain and 
not the expense of the ssh protocol. (which expense should be about 200 
msecs)

	Ingo

             reply	other threads:[~2008-07-28 16:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-28 16:01 Ingo Molnar [this message]
2008-07-29  5:50 ` q: git-fetch a tad slow? Shawn O. Pearce
2008-07-29  9:08   ` Ingo Molnar
2008-07-30  4:48     ` Shawn O. Pearce
2008-07-30 19:06       ` Ingo Molnar
2008-07-30 22:38         ` Shawn O. Pearce
2008-07-31  4:45         ` Shawn O. Pearce
2008-07-31 21:03           ` Ingo Molnar
2008-07-31 21:11             ` Ingo Molnar
2008-07-31 21:19               ` Shawn O. Pearce

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=20080728160138.GA12777@elte.hu \
    --to=mingo@elte.hu \
    --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.
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).