[vcs-log] inline indexOneByOne method

This commit is contained in:
Julia Beliaeva
2017-07-26 00:38:00 +03:00
parent c36a10dd11
commit 8101d1537b
@@ -587,9 +587,9 @@ public class VcsLogPersistentIndex implements VcsLogIndex, Disposable {
TroveUtil.processBatches(commits, BATCH_SIZE, batch -> {
counter.indicator.checkCanceled();
if (indexOneByOne(batch)) {
counter.newIndexedCommits += batch.size();
}
List<String> hashes = TroveUtil.map(batch, value -> myStorage.getCommitId(value).getHash().asString());
myProviders.get(myRoot).readFullDetails(myRoot, hashes, VcsLogPersistentIndex.this::storeDetail, true);
counter.newIndexedCommits += batch.size();
counter.displayProgress();
});
@@ -597,13 +597,6 @@ public class VcsLogPersistentIndex implements VcsLogIndex, Disposable {
flush();
}
private boolean indexOneByOne(@NotNull TIntHashSet commits) throws VcsException {
VcsLogProvider provider = myProviders.get(myRoot);
List<String> hashes = TroveUtil.map(commits, value -> myStorage.getCommitId(value).getHash().asString());
provider.readFullDetails(myRoot, hashes, VcsLogPersistentIndex.this::storeDetail, true);
return true;
}
public void indexAll(@NotNull TIntHashSet commits, @NotNull CommitsCounter counter) throws VcsException {
counter.displayProgress();