From: Junio C Hamano Date: Thu, 29 Sep 2011 19:10:06 GMT Subject: Re: Git is not scalable with too many refs/* Message-ID: <7vy5x7rwq9.fsf@alter.siamese.dyndns.org> In-Reply-To: <4E84B89F.4060304@lsrfire.ath.cx> René Scharfe writes: > Hmm. Can we get rid of the multiple ref lookups fixed by the above > *and* the overhead of dealing with a textual argument list at the same > time by calling add_pending_object directly, like this? (Factoring > out add_pending_sha1 should be a separate patch..) I haven't tested it or thought about it through, but it smells right ;-) Also we would probably want to drop "next" field from "struct ref_list" (i.e. making it not a linear list), introduce a new "struct ref_array" that is a ALLOC_GROW() managed array of pointers to "struct ref_list", make get_packed_refs() and get_loose_refs() return a pointer to "struct ref_array" after sorting the array contents by "name". Then resolve_ref() can do a bisection search in the packed refs array when it does not find a loose ref.