git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Ryan Lortie <desrt@desrt.ca>
Cc: Konstantin Khomoutov <flatworm@users.sourceforge.net>,
	git@vger.kernel.org
Subject: Re: 'git branch' when origin branch with same name exists
Date: Wed, 20 Jun 2012 10:31:39 +0200	[thread overview]
Message-ID: <4FE18A6B.9020207@op5.se> (raw)
In-Reply-To: <4FE0B1A1.9030509@desrt.ca>

On 06/19/2012 07:06 PM, Ryan Lortie wrote:
> 
>> Anyway, this will make each call to git-branch to perform a crawl
>> over the refs/heads hierarchy which, I think, is not worth the
>> result.
> 
> I know branching is lightweight with git, but I don't understand that
> the operation is so performance-critical that a enumerating a
> directory and doing a few stats would be a huge issue...
> 
> If it is decided to only check the 'origin' remote then we're talking
> about one single stat() syscall.
> 

Not really. I don't remember which repository it was, but the "packed-refs"
feature came about as a result of one repository having in excess of 120k
refs. So your "a few stat() calls" could well end up nuking performance
totally for someone else, and "one stat call for origin" is only true if
origin only has one ref, which is obviously not the case for some of the
larger projects.

In general, assuming everyone else uses a piece of software the same way
you do is a recipe for creating poorly performing programs.

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

  reply	other threads:[~2012-06-20  8:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19 14:51 'git branch' when origin branch with same name exists Ryan Lortie
2012-06-19 15:18 ` jaseem abid
2012-06-19 15:35 ` Michael Schubert
2012-06-19 15:54   ` Ryan Lortie
2012-06-19 16:17     ` Philippe Vaucher
2012-06-19 15:57   ` Angus Hammond
2012-06-19 16:06 ` Konstantin Khomoutov
2012-06-19 17:06   ` Ryan Lortie
2012-06-20  8:31     ` Andreas Ericsson [this message]
2012-06-19 17:21 ` Thomas Rast
2012-06-19 18:31   ` Junio C Hamano
2012-06-19 20:44     ` Ryan Lortie
2012-06-19 21:32       ` Junio C Hamano
2012-06-19 21:50         ` Ryan Lortie
2012-06-19 23:21       ` Phil Hord
2012-06-20 17:32         ` Junio C Hamano
2012-06-20 17:51           ` Matthieu Moy
2012-06-20 18:07             ` Junio C Hamano
2012-06-19 18:22 ` Junio C Hamano

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=4FE18A6B.9020207@op5.se \
    --to=ae@op5.se \
    --cc=desrt@desrt.ca \
    --cc=flatworm@users.sourceforge.net \
    --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).