Move "void *util" from "struct object" into "struct commit"

Every single user actually wanted this only for commit objects, and we
have no reason to waste space on it for other object types. So just move
the structure member from the low-level "struct object" into the "struct
commit".

This leaves the commit object the same size, and removes one unnecessary
pointer from all other object allocations.

This shrinks memory usage (still at a fairly hefty half-gig, admittedly)
of "git-rev-list --all --objects" on the mozilla repo by another 5% in my
tests.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Linus Torvalds
2006-06-17 18:26:18 -07:00
committed by Junio C Hamano
parent 885a86abe2
commit d3ff6f5501
6 changed files with 48 additions and 42 deletions

View File

@ -11,6 +11,7 @@ struct commit_list {
struct commit {
struct object object;
void *util;
unsigned long date;
struct commit_list *parents;
struct tree *tree;