I'm making a program that exports the contents of my repository (or specific directory / files of my repo) into a directory on a specified server. I have the basic function working but the problem is the speed. My average tests for these exports are taking 193 seconds for all the files while running the command myself in a linux shell only takes about 6 seconds tops. Is there anything wrong with the way I am approaching this?
private boolean stageItems(SVNRepository repository, SVNUpdateClient
updateClient, String server,
String version, ObservableList<String> items) throws SVNException {
boolean success = false;
long totalDuration = 0;
String baseUrlPath = "http://" + repository.getLocation().getHost() + repository.getLocation().getPath()
+ "/branches/versions/" + version;
Iterator<String> itemItr = items.iterator();
while (itemItr.hasNext()) {
long startTime = System.nanoTime() / 1000000;
String item = itemItr.next();
String fullPath = baseUrlPath + "/" + item;
SVNURL url = SVNURL.parseURIEncoded(fullPath);
SVNNodeKind nodeKind = repository.checkPath("/branches/versions/" + version + "/" + item, -1);
File destPath = new File("\\\\" + server + "\\u1\\pyle\\team\\moy\\bbjstaging\\" + item);
if (nodeKind == SVNNodeKind.DIR) {
long l = updateClient.doExport(url, destPath, SVNRevision.HEAD,
SVNRevision.HEAD, null, true, SVNDepth.INFINITY);
} else {
long l = updateClient.doExport(url, destPath, SVNRevision.HEAD,
SVNRevision.HEAD, null, true, SVNDepth.EMPTY);
}
}
return success;
}