path: root/delta.h
diff options
authorNicolas Pitre <>2006-05-15 17:47:16 (GMT)
committerJunio C Hamano <>2006-05-15 19:32:13 (GMT)
commitff45715ce50b80ab16ee0d0dc7fff0c47a51959a (patch)
treeaab49d4b562b46c146524f0f9729037666b79380 /delta.h
parent4e8da1958111796d55ad63b229ebd3ae6c54bf87 (diff)
pack-object: slightly more efficient
Avoid creating a delta index for objects with maximum depth since they are not going to be used as delta base anyway. This also reduce peak memory usage slightly as the current object's delta index is not useful until the next object in the loop is considered for deltification. This saves a bit more than 1% on CPU usage. Signed-off-by: Nicolas Pitre <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'delta.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/delta.h b/delta.h
index 727ae30..7b3f86d 100644
--- a/delta.h
+++ b/delta.h
@@ -18,6 +18,8 @@ create_delta_index(const void *buf, unsigned long bufsize);
* free_delta_index: free the index created by create_delta_index()
+ *
+ * Given pointer must be what create_delta_index() returned, or NULL.
extern void free_delta_index(struct delta_index *index);