You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Mikael Petterson (KI/EAB)" <mi...@ericsson.com> on 2005/04/01 08:57:31 UTC
A memory problem in ant or build.xml
Hi,
I am running Apache Ant version 1.6.2 compiled on July 16 2004 on Solaris 8.
I have about 1600 source files that I build.
I used ANT_OPTS="-Xms256m -Xmx512m";export ANT_OPTS
to execute my build file. ( Is there a way to check that ant use this env. variable?).
Then I get 'java.lang.OutOfMemoryError'
I increase the heap ( start and max) to:
ANT_OPTS="-Xms512m -Xmx768m";export ANT_OPTS
And I don't get the error. Everything is fine.....or...
Well as a programmer I want to make sure that we use the resources as efficient as possible.
Can I optimize my build.xml to consume as litte with resources as possible? How?
Is it ' a known problem' that ant 1.6.2 consumes a lot of memory?
Does it matter which jvm I start ant in? ( I am using 1.4.2_02 )
All hints are very much appreciated.
//Mikael
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: A memory problem in ant or build.xml
Posted by Rainer Noack <ra...@noacks.net>.
Hi Mikael,
You can fork the big memory eaters (f.e. <javac/> with your 1600 sourcefiles
or maybe <javadoc/>).
Then You can set up your main ant-process with just a small amount of memory
(xms and xmx)
And give the forked processes as much as they need.
Kind Regards
Rainer
> -----Original Message-----
> From: Mikael Petterson (KI/EAB)
> [mailto:mikael.petterson@ericsson.com]
> Sent: Friday, April 01, 2005 8:58 AM
> To: user@ant.apache.org
> Subject: A memory problem in ant or build.xml
>
>
> Hi,
>
> I am running Apache Ant version 1.6.2 compiled on July 16
> 2004 on Solaris 8. I have about 1600 source files that I build.
>
> I used ANT_OPTS="-Xms256m -Xmx512m";export ANT_OPTS
> to execute my build file. ( Is there a way to check that ant
> use this env. variable?). Then I get
> 'java.lang.OutOfMemoryError' I increase the heap ( start and
> max) to: ANT_OPTS="-Xms512m -Xmx768m";export ANT_OPTS And I
> don't get the error. Everything is fine.....or...
>
> Well as a programmer I want to make sure that we use the
> resources as efficient as possible. Can I optimize my
> build.xml to consume as litte with resources as possible?
> How? Is it ' a known problem' that ant 1.6.2 consumes a lot
> of memory?
> Does it matter which jvm I start ant in? ( I am using 1.4.2_02 )
>
> All hints are very much appreciated.
>
> //Mikael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org