![]() Doing a getFileStoreAttributes call even when the file doesn't exist is unnecessary. This call is particularly slow on some filesystems. Instead, do it only when the file exists and load the appropriate cache. This update can help speed up RefDirectory.exactRef when the ref is packed, but has a corresponding empty dir for it under 'refs/'. This scenario can happen when an atomic 'BatchRefUpdate' creates new sharded refs. For example, consider the case where we create 50k sharded refs in a new namespace called 'new-refs' using an atomic 'BatchRefUpdate'. The refs are named like 'refs/new-refs/01/1/1', 'refs/new-refs/01/1/2', 'refs/new-refs/01/1/3' and so on. After the refs are created, the 'new-refs' namespace looks like below: $ find refs/new-refs -type f | wc -l 0 $ find refs/new-refs -type d | wc -l 5101 At this point, an 'exactRef' call on each of the 50k refs without this change takes ~30s, where as with this change it takes ~2.5s. Change-Id: I4a5d4c6a652dbeed1f4bc3b4f2b2f1416f7ca0e7 Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com> |
||
---|---|---|
.. | ||
.settings | ||
META-INF | ||
findBugs | ||
resources/org/eclipse/jgit | ||
src/org/eclipse/jgit | ||
.classpath | ||
.fbprefs | ||
.gitignore | ||
.project | ||
BUILD | ||
about.html | ||
build.properties | ||
plugin.properties | ||
pom.xml |