Thread (70 messages) flat view 70 messages, 15 authors, 2016-06-15

Re: Git is not scalable with too many refs/*

From: Julian Phillips <hidden>
Date: 2016-06-15 22:52:08

Possibly related (same subject, not in this thread)

On Thu, 29 Sep 2011 20:27:43 +0200, René Scharfe wrote:
Am 29.09.2011 04:19, schrieb Julian Phillips:
quoted
Does the following help?
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 5e356a6..f0f4ca1 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -605,7 +605,7 @@ static int add_one_ref_to_rev_list_arg(const 
char
*refname,
                                       int flags,
                                       void *cb_data)
 {
-       add_one_rev_list_arg(cb_data, refname);
+       add_one_rev_list_arg(cb_data, strdup(sha1_to_hex(sha1)));
        return 0;
 }
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..)
Seems like a good idea.  I get the same sort of times as with my patch, 
but it makes the code _feel_ much nicer (and slightly smaller).  Mine 
was definitely more of a "it's 2am, but I think the problem is here" 
type of patch ;)

-- 
Julian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help