sharkbait
sharkbait

Reputation: 3040

Increase memory for ant

I have an issue about memory usage. I had 8 GB of RAM and I had my ant settings like this:

set ANT_OPTS=-Xmx512m -XX:MaxPermSize=2G

Now, I have installed 16 GB of RAM but when I run an ant clean all, this take the same time to compile.

How I have to set the options to increase memory and speed? I have Windows 7 64bit and 16 GB RAM. I use Eclipse, but I run ant clean all and server Tomcat from the cmd.

Upvotes: 4

Views: 16343

Answers (1)

Cootri
Cootri

Reputation: 3836

you have strange configuration - PermGen size is four times bigger than a Heap. Maybe it is a typo? Try this:

set ANT_OPTS=-Xmx2G -XX:MaxPermSize=512m

But there is no much to do with ant - big project needs a long time to build. Do not forget, that this process can consume much CPU (then it's good idea to make ant use multiple threads by parallel tasks or custom runtime) or have HDD bottleneck (consider using SSD or even RAM drive in this case)

Upvotes: 7

Related Questions