summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-09-10 04:06:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-09-10 05:25:43 (GMT)
commit59921b4b3f24b19e2593085ee27d5e1f2448c6bb (patch)
treef65ca633cdc07b9507019041ffe646f367e6cbeb /builtin-pack-objects.c
parentc2a33679a726aeb75529540c2b295f21023ddbc7 (diff)
downloadgit-59921b4b3f24b19e2593085ee27d5e1f2448c6bb.zip
git-59921b4b3f24b19e2593085ee27d5e1f2448c6bb.tar.gz
git-59921b4b3f24b19e2593085ee27d5e1f2448c6bb.tar.bz2
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 <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 6014119..b13558e 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;