summaryrefslogtreecommitdiff
path: root/object.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-06-18 01:26:18 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-06-18 01:49:45 (GMT)
commitd3ff6f55012c939740ce0982b24aeb6fba3c6e4f (patch)
tree3784f041b9ceb25a8092b85f1d86119da7bc5a45 /object.h
parent885a86abe2e9f7b96a4e2012183c6751635840aa (diff)
downloadgit-d3ff6f55012c939740ce0982b24aeb6fba3c6e4f.zip
git-d3ff6f55012c939740ce0982b24aeb6fba3c6e4f.tar.gz
git-d3ff6f55012c939740ce0982b24aeb6fba3c6e4f.tar.bz2
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>
Diffstat (limited to 'object.h')
-rw-r--r--object.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/object.h b/object.h
index a0762b6..f4ee2e5 100644
--- a/object.h
+++ b/object.h
@@ -29,7 +29,6 @@ struct object {
unsigned flags : FLAG_BITS;
unsigned char sha1[20];
struct object_refs *refs;
- void *util;
};
extern int track_object_refs;