I am facing a problem with svnant. <svnModified />
takes over 3 minutes to complete on my working copy (svn metadata version 1.7: using the latest svnant from HEAD). If I try to check for modifications using TortoiseSVN 1.7.12 it takes under 3 seconds. If I do a svn status from the command prompt it also takes under 3 seconds.
My test build file looks like this:
<project name="tools" default="default" basedir=".">
<path id="paths.classpath">
<fileset dir="." caseSensitive="false">
<include name="svnant/**/*.jar" />
</fileset>
</path>
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="paths.classpath" />
<fileset id="filesets.svn.modified" dir="C:/Workspace/projects">
<svnModified />
</fileset>
<target name="default">
<pathconvert pathsep="
" property="target.output" refid="filesets.svn.modified" />
<echo>${target.output}</echo>
</target>
</project>
Am I doing something wrong? I tried upgrading svnkit to the latest version but it made no difference. Am I including too many or too few jars? Other details: Ant 1.9.0, Windows 7 x64, Java 1.7.0_21 x64
My libs:
+---lib
antlr-runtime-3.4.jar
jna-3.4.0.jar
LICENSE-ANTLR.txt
LICENSE-JAVAHL.txt
LICENSE-JNA.txt
LICENSE-SEQUENCE.txt
LICENSE-SQLJET.txt
LICENSE-TRILEAD.txt
sequence-library-1.0.2.jar
sqljet-1.1.7.jar
svn-javahl.jar
svnant.jar
svnClientAdapter.jar
svnkit-1.7.9.jar
svnkit-cli-1.7.9.jar
svnkit-javahl16-1.7.9.jar
trilead-ssh2-1.0.0-build216.jar
I don't know for sure, but my guess is that when using svnModified
, svn is being queried for each file under C:/Workspace/projects
. But when using svn status
with the command line or with TortoiseSVN, everything happens within the svn software. In the first case there is probably a lot of little queries about one file, in the second case there is only one query about a whole file tree.
To improve the performance, the only way I can think of is:
calling a svn status
(via the exec
or svnant
tasks) and get its output
filter the output with regexp to keep the interesting lines about modified files
make it a list of file names and use resourcelist
to build a resource collection from that flat list of names
Some links you might be interested in to implement it: