This tutorial explains about performance improvements to java projects working in Netbeans IDE
Netbeans Performance Improvement
Following are list of checklist that you
- Always update netbeans to latest version.
Latest version also includes all the optimizations and bugs fixed to the latest release.
Use latest Java version
Always disable the plugins that are not required
By default netbeans supports lot of functionalities and plugins, So you can disable plugins
Go to 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
.
There are two important things that can improve heap size
- Garbage Collection
If your processor is single threaded, you can use
UseSerialGC
For multiple processor, you can useUseParallelGC
- Change permsize
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 statup of netbeans
-J-Xverify:none
: Disable/enable java bytecode verification
You can also consider other memory settings to improve 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’