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@xxxxxx 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. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html