]> source.dussan.org Git - jgit.git/commit
Micro-optimize CanonicalTreeParser next() for ObjectWalk 60/260/1
authorShawn O. Pearce <spearce@spearce.org>
Tue, 2 Feb 2010 22:21:27 +0000 (14:21 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 2 Feb 2010 22:27:49 +0000 (14:27 -0800)
commit0e137c4d9e5c245424e78208a104fbc8b3aaee2a
tree7785536acea6aa838931ec8635d95eb93c5b89b9
parentdb54736e714e3c7e8e54b38bbf9f1c2d0026d15d
Micro-optimize CanonicalTreeParser next() for ObjectWalk

ObjectWalk is invoking next() for each record we consider in a tree.
Rather than doing several method calls against the current parser,
and testing if we are at eof() at least twice per next() invocation,
do it only once and inline the logic to move the parser forward.

Change-Id: If5938f5d7b3ca24f500a184c9bd2ef193015414e
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/CanonicalTreeParser.java