Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to improve Netbeans performance?

Is there a real way to get Netbeans to load and work faster?

It is too slow and gets worse when you have been coding for some time. It eats all my RAM.


I am on a Windows machine, specifically Windows Server 2008 Datacenter Edition x64, 4Gb of RAM, 3Ghz Core 2 Duo processor, etc. I am using the x64 JDK. I use the NOD32 Antivirus since for me it is the best in machine performance.

In Task Manager netbeans.exe only shows no more than 20 Mb, java.exe more than 600Mb.

My project is a J2EE web application, more than 500 classes, only the project libraries not included (externals). And when I said slow, I mean 3, 4, 5 minutes or more Netbeans is frozen.

Is my project just too large for Netbeans, if it has to read all files to get the state of files like error warnings, svn status and more? Can I disable all this? Is it possible to set it to scan only when I open a file?

My CPU use is normally at 30 percent with all my tools opened, I mean Netbeans, MS SQL Manager, Notepad, XMLSpy, Task Manager, Delphi, VirtualBox. Netbeans eats more RAM than my virtualized systems.

In Linux it is as slow as in Windows in the same machine (Ubuntu 8.04 x64).

It is true that the Netbeans team improved startup speed but when it opens it begins to cache ALL.

I have used some JVM parameters to set high memory usage and others: "C:\Program Files\NetBeans Dev\bin\netbeans.exe" -J-Xms32m -J-Xmx512m -J-Xverify:none -J-XX:+CMSClassUnloadingEnabled

But it is still slow.

like image 667
yeradis Avatar asked Oct 23 '08 13:10

yeradis


People also ask

How much RAM do I need for NetBeans?

For developing medium-sized applications, that is 100–2000 source files, on a system with one CPU and 1 GB of RAM: 512 MB. For developing large-sized applications, that is more than 2000 source files, on a system with one or multiple CPUs and 2 GB of RAM: 1.5 GB.

Why does NetBeans take so long to run?

Try to run your jar with increased jvm memory settings. You know it's one of those java options like -Xmx512m when you run the java -jar -Xmx512m yourjar. jar at the command line. Another guess here, Netbeans is probably executing your pure .

Why NetBeans build successful but no output?

If you are on NetBeans IDE 11.1, just clean and build the project with "Shift+F11" and then run your project with "F6". That will fix your issue. In some cases, merely restarting the IDE can also do the job.


2 Answers

Very simple solution to the problem when your NetBeans or Eclipse IDE seems to be using too much memory:

  1. Disable the plugins you are not using.
  2. close the projects you are not working on.

I was facing similar problem with Netbeans 7.0 on my Linux Mint as well Ubuntu box. Netbeans was using > 700 MiB space and 50-80% CPU. Then I decided do some clean up. I had 30 plugins installed, and I was not using most of them. So, I disabled the plugins I was not using, a whopping 19 plug ins I disabled. now memory uses down to 400+ MiB and CPU uses down to 10 and at max to 50%.

Now my life is much easier.

like image 132
Ravish Avatar answered Oct 02 '22 14:10

Ravish


Don't invest time in optimizing your NB installation as long as you can scale vertically: get a SSD (and faster hardware in general).

Also:

  • Add an exception for all relevant folders (e.g. project dir, temp dir) to your anti virus software (or better, get rid of it).
  • Don't use network drives for your projects
    • check if your home drive is local
    • check if your IDE uses non-local folders (e.g. %AppData%)
like image 45
atamanroman Avatar answered Oct 02 '22 14:10

atamanroman