PackWriter: Position tags after commits
Annotated tags need to be parsed by many viewing tools, but putting them at the end of the pack hurts because kernel prefetching might not have loaded them, since they are so far from the commits they reference. Position tags right behind the commits, but before the trees. Typically the annotated tag set for a repository is very small, so the extra prefetch burden it puts on tools that don't need annotated tags (but do need commits and trees) is fairly low. Change-Id: Ibbabdd94e7d563901c0309c79a496ee049cdec50 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
26dffbe04d
commit
bd6853e90a
|
@ -977,8 +977,10 @@ private void runTasks(ExecutorService pool, ThreadSafeProgressMonitor pm,
|
|||
}
|
||||
|
||||
private void writeObjects(PackOutputStream out) throws IOException {
|
||||
for (List<ObjectToPack> list : objectsLists)
|
||||
writeObjects(out, list);
|
||||
writeObjects(out, objectsLists[Constants.OBJ_COMMIT]);
|
||||
writeObjects(out, objectsLists[Constants.OBJ_TAG]);
|
||||
writeObjects(out, objectsLists[Constants.OBJ_TREE]);
|
||||
writeObjects(out, objectsLists[Constants.OBJ_BLOB]);
|
||||
}
|
||||
|
||||
private void writeObjects(PackOutputStream out, List<ObjectToPack> list)
|
||||
|
|
Loading…
Reference in New Issue