Reputation: 1
using the "modified" selector when copying TO a mapped drive, to speed up the task. However, I have the reverse situation - I'm building FROM a mapped drive, and copying the files to a local directory if they've changed.
This operation is incredibly slow. I'm trying to copy hundreds of files that are images / XML files. They rarely change. However, Ant takes a long time to determine whether they have been updated or not, even if it does not end up copying any of the files.
I've tried using the modify selector here too, but it's just as slow because it does the hash check on the mapped drive. I also tried forcing an overwrite so that it would always copy the files rather than do the date check. This was actually slightly faster, but still horrendously slow.
Is there any way to speed up the copy operation when copying FROM a mapped drive, or are all mechanisms slow on a mapped drive for determining whether the copy needs to happen? The only other option I can think of is to pull the copy operations out of the build path, and require the developer to do the copy manually when it's necessary.
<target name="createbackup">
<echo>Creating Backup...</echo>
<sequential>
<copy overwrite="true" todir="${result}">
<fileset dir="${FTPcode}">
<and>
<different targetdir="${dir2}" />
<present present="both" targetdir="${dir2}" />
</and>
</fileset>
</copy>
<delete includeemptydirs="true">
<fileset dir="${result}">
<and>
<size value="0" />
<type type="dir" />
</and>
</fileset>
</delete>
<tstamp>
<format property="tstamped-file-name" pattern="MM-dd-yyyy-hh-mm-ss-aa" />
</tstamp>
<zip destfile="${backup}\backup-${tstamped-file-name}.zip" basedir="${result}" />
</sequential>
</target>
Upvotes: 0
Views: 761