You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by SHAILJA <sh...@gmail.com> on 2010/06/01 16:42:44 UTC

Sometime making jar takes long time

Hi All,

During our day to day jobs, I see lot of difference in time taken by making
jar on different hosts. 
I have simple build.xml file to make jar only

<project name="common.primitive" default="jar" basedir=".">
<target name="jar">
<jar destfile="/u/kumari/main/base/java/jar/common.jar" 
     basedir="/u/kumari/main/base/java/classes"
     includes="common/**"/>
</target>
</project>

=====================
I used "ant-1.7.1/bin/ant jar" to make jar files. And I see three different
time taken on three different i386 hosts for same jar command like this
"Total time: 4 seconds", "Total time: 1 minute 33 seconds", and "Total time:
13 seconds".


I suspect Ant contributes to the problem by searching the file system for
items to add to the jar.  If this is the case, then we might be able to
configure Ant to reduce this file system activity.  

How can we configure Ant to reduce this file system activity ?

 Thanks
~Shailja


"

-- 
View this message in context: http://old.nabble.com/Sometime-making-jar-takes-long-time-tp28742939p28742939.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Sometime making jar takes long time

Posted by Stefan Bodewig <bo...@apache.org>.
SHAILJA,

this really is a question for the user list, not the dev list.

On 2010-06-01, SHAILJA wrote:

> I have simple build.xml file to make jar only

> <project name="common.primitive" default="jar" basedir=".">
> <target name="jar">
> <jar destfile="/u/kumari/main/base/java/jar/common.jar"
>      basedir="/u/kumari/main/base/java/classes"
>      includes="common/**"/>
> </target>
> </project>

basedir="/u/kumari/main/base/java/classes/common" and no includes may be
a tiny bit faster.  Not much, though.

> I used "ant-1.7.1/bin/ant jar"

Ant 1.7.1 is known to be a lot slower that Ant 1.8.x when it scans big
directory trees.

> I suspect Ant contributes to the problem by searching the file system for
> items to add to the jar.

It sure does.

> If this is the case, then we might be able to configure Ant to reduce
> this file system activity.

I wouldn't know how, since it has to scan the filesystems once anyway.
Like I said there have been performance improvements in 1.8.0 but they
only apply if your directory tree contains many files.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org