Skip to content
Snippets Groups Projects
Commit 0e137c4d authored by Shawn Pearce's avatar Shawn Pearce
Browse files

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: default avatarShawn O. Pearce <spearce@spearce.org>
parent db54736e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment