author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 15 Jan 2007 11:51:58 +0000 (06:51 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 15 Jan 2007 12:12:23 +0000 (07:12 -0500) | ||
commit | 2fce1f3c862845d23b2bd8305f97abb115623192 | |
tree | bffd9086a9fab8f8202303872da69ffa762c5bec | tree | snapshot |
parent | 3e005baf8542a3116e51c4b0a27b72c7e14d949b | commit | diff |
Optimize index creation on large object sets in fast-import.
When we are generating multiple packfiles at once we only need
to scan the blocks of object_entry structs which contain objects
for the current packfile. Because the most recent blocks are at
the front of the linked list, and because all new objects going
into the current file are allocated from the front of that list,
we can stop scanning for objects as soon as we identify one which
doesn't belong to the current packfile.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
When we are generating multiple packfiles at once we only need
to scan the blocks of object_entry structs which contain objects
for the current packfile. Because the most recent blocks are at
the front of the linked list, and because all new objects going
into the current file are allocated from the front of that list,
we can stop scanning for objects as soon as we identify one which
doesn't belong to the current packfile.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | diff | blob | history |