use of com.intellij.vcs.log.util.StopWatch in project intellij-community by JetBrains.
the class VcsLogData method initialize.
public void initialize() {
final StopWatch initSw = StopWatch.start("initialize");
myDataLoaderQueue.clear();
runInBackground(indicator -> {
resetState();
readCurrentUser();
DataPack dataPack = myRefresher.readFirstBlock();
fireDataPackChangeEvent(dataPack);
initSw.report();
});
}
use of com.intellij.vcs.log.util.StopWatch in project intellij-community by JetBrains.
the class VcsLogData method readCurrentUser.
private void readCurrentUser() {
StopWatch sw = StopWatch.start("readCurrentUser");
for (Map.Entry<VirtualFile, VcsLogProvider> entry : myLogProviders.entrySet()) {
VirtualFile root = entry.getKey();
try {
VcsUser me = entry.getValue().getCurrentUser(root);
if (me != null) {
myCurrentUser.put(root, me);
} else {
LOG.info("Username not configured for root " + root);
}
} catch (VcsException e) {
LOG.warn("Couldn't read the username from root " + root, e);
}
}
sw.report();
}
use of com.intellij.vcs.log.util.StopWatch in project intellij-community by JetBrains.
the class VcsLogRefresherImpl method loadRecentData.
@NotNull
private LogInfo loadRecentData(@NotNull final Map<VirtualFile, VcsLogProvider.Requirements> requirements) throws VcsException {
final StopWatch sw = StopWatch.start("loading commits");
final LogInfo logInfo = new LogInfo(myStorage);
new ProviderIterator() {
@Override
public void each(@NotNull VirtualFile root, @NotNull VcsLogProvider provider) throws VcsException {
VcsLogProvider.DetailedLogData data = provider.readFirstBlock(root, requirements.get(root));
logInfo.put(root, compactCommits(data.getCommits(), root));
logInfo.put(root, data.getRefs());
storeUsersAndDetails(data.getCommits());
sw.rootCompleted(root);
}
}.iterate(getProvidersForRoots(requirements.keySet()));
myUserRegistry.flush();
myIndex.scheduleIndex(false);
sw.report();
return logInfo;
}
use of com.intellij.vcs.log.util.StopWatch in project intellij-community by JetBrains.
the class VcsLogRefresherImpl method multiRepoJoin.
@NotNull
private static <T extends GraphCommit<Integer>> List<T> multiRepoJoin(@NotNull Collection<List<T>> commits) {
StopWatch sw = StopWatch.start("multi-repo join");
List<T> joined = new VcsLogMultiRepoJoiner<Integer, T>().join(commits);
sw.report();
return joined;
}
use of com.intellij.vcs.log.util.StopWatch in project intellij-community by JetBrains.
the class GitLogProvider method readCurrentTagNames.
@NotNull
private Set<String> readCurrentTagNames(@NotNull VirtualFile root) throws VcsException {
StopWatch sw = StopWatch.start("reading tags in " + root.getName());
Set<String> tags = newHashSet();
GitTag.listAsStrings(myProject, root, tags, null);
sw.report();
return tags;
}
Aggregations