![]() RevWalk#createCommit() will inspect the commit-graph file to find the specified object's graph position and then return a new RevCommitCG instance. RevCommitGC is a RevCommit with an additional "pointer" (the position) to the commit-graph, so it can load the headers and metadata from there instead of the pack. This saves IO access in walks where the body is not needed (i.e. #isRetainBody is false and #parseBody is not invoked). RevWalk uses automatically the commit-graph if available, no action needed from callers. The commit-graph is fetched on first access from the reader (that internally can keep it loaded and reuse it between walks). The startup cost of reading the entire commit graph is small. After testing, reading a commit-graph with 1 million commits takes less than 50ms. If we use RepositoryCache, it will not be initialized util the commit-graph is rewritten. Bug: 574368 Change-Id: I90d0f64af24f3acc3eae6da984eae302d338f5ee Signed-off-by: kylezhao <kylezhao@tencent.com> |
||
---|---|---|
.. | ||
.settings | ||
META-INF | ||
exttst/org/eclipse/jgit | ||
findBugs | ||
src/org/eclipse/jgit | ||
tst/org/eclipse/jgit | ||
tst-rsrc | ||
.classpath | ||
.gitignore | ||
.project | ||
BUILD | ||
build.properties | ||
org.eclipse.jgit.core--All-Tests (Java 11) (de).launch | ||
org.eclipse.jgit.core--All-Tests (Java 11).launch | ||
org.eclipse.jgit.core--All-Tests.launch | ||
org.eclipse.jgit.test-WalkEncryptionTest-Proxy.launch | ||
org.eclipse.jgit.test-WalkEncryptionTest.launch | ||
plugin.properties | ||
pom.xml | ||
tests.bzl |