From: Nicolas Pitre Date: Mon, 10 Sep 2007 04:06:10 +0000 (-0400) Subject: threaded delta search: better chunck split point X-Git-Tag: v1.5.4-rc0~440^2~5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=59921b4b3f24b19e2593085ee27d5e1f2448c6bb;p=git.git threaded delta search: better chunck split point Try to keep object with the same name hash together. Suggested by Martin Koegler. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index 60141196d..b13558ee7 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -1635,6 +1635,11 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size, if (sublist_size > list_size) sublist_size = list_size; + /* try to split chunks on "path" boundaries */ + while (sublist_size < list_size && list[sublist_size]->hash && + list[sublist_size]->hash == list[sublist_size-1]->hash) + sublist_size++; + pthread_mutex_lock(&data_provider); data_requester->list = list; data_requester->list_size = sublist_size;