[PATCH 2/3] threaded delta search: better chunck split point

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try to keep object with the same name hash together.

Suggested by Martin Koegler.

Signed-off-by: Nicolas Pitre <nico@xxxxxxx>
---
 builtin-pack-objects.c |    5 +++++
 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;
-- 
1.5.3.1.847.g42fb1-dirty

-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux