Tiny
Tiny

Reputation: 27899

NetBeans goes very slow

I'm using NetBeans IDE 6.9.1. I have a web application in JSP using Spring version 3.0.2 and Hibernate Tools 3.2.1.GA. Slowly and gradually, it has been growing in size yet it's not a very big application though I have added many external class libraries as and when required like HibernateValidator.

The performance is degraded and it takes a considerable amount of time in building the application. When changes are saved, many a times, the application is deployed infinitely/endlessly with the auto-deploy feature of NetBeans. It never ends and I have to restart the IDE and the procedure begins all over again from scratch. Sometimes the application is stopped automatically and I have to restart the Tomcat server (6.0.26) because mostly an attempt to restart the application doesn't succeed.

Many a times (every half an hour or so), the application ends with following exception.

java.lang.OutOfMemoryError: PermGen Space

and I have to restart the system itself!

While working with JPA along with EJB and JSF as a front-end (GlassFish Server 3), it often wasn't the case even with heavily loaded applications with the same version of the NetBeans IDE and exactly the same platform, if I remember correctly.

Are there some ways to improve the performance?

Upvotes: 0

Views: 7298

Answers (2)

Joseph
Joseph

Reputation: 21

I understand you are using Netbeans. A simple solution would be to go tools->servers -> (selecte the server (in your case tomcat))->platform, then in the VM option, paste this settings:

-Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m

that would solve your problem. good luck!

Upvotes: 2

Thomas
Thomas

Reputation: 2767

try overriding the jvm option for more memory if you can

export JAVA_OPTS="-Xms64m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=756m"

here http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/reference/JavaOptsSummary.html you can find a bit more about java_opts parameters

Upvotes: 2

Related Questions