I'm using Apache Ant1.7 for the build process. Within our build.xml I authored the next line for zip a folder.

<zip destfile="${build.lib.dir}/HzERM_Server_Side_workarea.zip">
        <fileset dir="${base.working.dir}"/>
</zip>

Issue is.... I'm attempting to zip 3.20GB size folder, it's taking nearly 24 minutes 20 secs to zip the folder. Would you help me how you can improve its performance.

You could utilize the exec ANT task and obtain it to operate an exterior compression tool, for example 7Zip with command line instructions.

It appears this would be a performance bug in Ant that's been fixed in version 1.8.1. The code building the zip was using Hashtable improperly leading to O(n) rather than O(1) performance.

Check this out blog for that particulars: http://blog.zorinaq.com/?e=16