Hi, I am using ant 1.7.0 <sync> task to sync 2 very large directories. It currently takes too much time to do this (to be usable). Here is the target that I run.
<target name="sync.dir" description="runs sync between ${src} and ${dest}" > <sync todir="${dest}" overwrite="false" verbose="true"> <fileset dir="${src}"/> </sync> </target> I invoked it whit build metrics listener and the output that I (finally) got was: [sync] Removed 1 dangling directory from C:\Work\ [sync] Removed 12 dangling files from C:\Work\ [sync] Removed 141 empty directories from C:\Work\ BUILD SUCCESSFUL Total time: 944 minutes 28 seconds BUILD METRICS: Local Time, Child Time, Invocation Count, Type, Name, Location 56667816, 0, 1, TASK, sync, C:\Work\build.xml:36: 3237, 56667816, 1, BUILD, build, n/a: 0, 56667816, 1, TARGET, sync.sdk, C:\Work\build.xml:34: Listener that I used was: -listener net.java.antutility.BuildMetricsL Finally the question is what is the fastest way to sync two large directories? This obivously isn't. I was thinking that maybe using resource collections and diffrence sets would be better.. Any ideas. Also in this case it is possible to first store the index of files into an object in disk and compare that to destination directory. This could be faster because it wouldn't have to scan source dir at all.. -Antti-