This tutorial explains performance improvements to Java projects working in Netbeans IDE
Netbeans Performance Improvement
Following a list of checklists that you
- Always update Netbeans to the latest version.
The latest version also includes all the optimizations and bugs fixed in the latest release.
Use the latest Java version
Always disable the plugins that are not required
By default, NetBeans supports a lot of functionalities and plugins, So you can disable plugins
Go to the Tools Menu
Select
Plugins
Menu ItemIt opens the Plugins popup window
Select the
Installed
tabIt lists out all installed plugins
Uncheck the plugin that is not required
Also Configure Garbage Collection and heap size settings in netbeans.conf
netbeans.conf
is located in NETBEANS_HOME/etc/netbeans.conf
.
Two important things can improve heap size
- Garbage Collection
If your processor is single-threaded, you can use
UseSerialGC
For multiple processors, you can useUseParallelGC
- Change perm size
netbeans_default_options=" -J-Xverify:none -J-Xmx1024m -J-Xss2m -J-Xms512m -J-XX:PermSize=32m -XX+UseSerialGC"
- -J-Xms512m : Initial heap size
- -J-Xmx1024m : Maximum Heap size allocated
- -J-XX:PermSize : Change permanent Area to improve startup of NetBeans
-J-Xverify:none
: Disable/enable Java bytecode verification
You can also consider other memory settings to improve the GC process
-J-XX:+UseConcMarkSweepGC
-J-XX:+UseParNewGC
-J-XX:+CMSClassUnloadingEnabled
-J-XX:+CMSPermGenSweepingEnabled
-J-XX:CompileThreshold
-J-XX:ReservedCodeCacheSize=1024m
-J-XX:+UseCodeCacheFlushing
-J-Dswing.aatext=true
- ‘-J-Dawt.useSystemAAFontSettings=lcd’
- ‘-J-XX:+UseG1GC’