First, the version of the IDE best corresponds to the version of the JDK.
The purpose of NetBeans optimization is to increase the startup speed and speed of NetBeans. The NetBeans optimization techniques described below are optimized on version 6.0beta2. The experiment has greatly improved the start-up speed of NetBeans.
1, modify the English Netbeans interface font size , modify%netbeans_home%\etc\netbeans.conf
Add –fontsize 13 to the netbeans_default_options.
2, modify the JVM memory configuration (native memory 1G, different memory size settings)
Add-j-xmx512m to the netbeans_default_options and modify the-j-xms256m.
"description"-j-xms32m
This setting notifies the Java virtual machine to set its initial heap size to a value of up to MB. By notifying the JVM how much memory it should initially allocate for the heap, we can prevent it from increasing the heap as the IDE uses more memory.
"description"-j-xmx128m
This setting specifies the maximum memory that a Java virtual machine should use for the heap. Setting a hard upper limit on this value means that the Java process cannot use more memory than the available physical RAM. For systems with more memory you can increase this limit –128 MB settings help ensure that the IDE performs the operation reliably on a 256MB system. Note: Do not set this value to be close to or greater than the number of physical RAM in the system, which will cause frequent swap space operations during the primary recycling process.
3, modify the-j-xx:permsize=20m in Netbeans_default_options
This is a more specific JVM switch, but it also shortens the startup time. This setting adjusts the size of the in-memory "permanent zone" (where classes are saved). Since we know that all IDE classes occupy a certain amount of memory, we tell the JVM how much memory it will need. This setting eliminates major garbage collection events during startup on many systems. Users of SunOne Studio or other Ides that include more modules may want to set this number higher.
4, add-j-xverify:none to the netbeans_default_options.
This switch turns off Java bytecode validation, speeding up class loading, and eliminating the need to load classes for verification purposes only during startup. This switch will significantly shorten the start-up time.
5. Remove the unwanted modules from the tools-plugins-installed
I got rid of glashfish;jsf;cvs;subversion and so on. The speed has been greatly improved. Of course, if your development requires these modules do not need to be removed.
6. Modifying the editor configuration
Remove all Javadoc automatic pop-up windows, set all auto-completion delay to 0, and remove all AutoComplete-case sensitivity.
Note: In the Java Code Editor settings of NETBEANS6, there is no default setting for automatic completion of code. You can manually add them to the configuration file C:\Documents and Settings\%user_name%\.netbeans\6.0beta2\config\editors\text\x-java Properties.xml, join
The description Preperties.xml file does not exist by default and will not appear until you modify the editor configuration.
According to experience, XMX should be set to half of physical memory, the initial heap size XMS is xmx 1/2, such as 1G memory machine, xms256m, xmx512m
Netbeans5.5.1 The default permsize is 160m, if you frequently encounter java.lang.OutOfMemoryError:PermGen space anomalies in development, you can set this permsize larger.
Some other JVM switches are listed below, which can affect NetBeans performance more or less on some systems, rather than on all systems. Although the use of them will have a certain impact, but it is still worth a try.
*-j-xx:compilethreshold=100
This switch will increase the startup time because the HotSpot JVM will compile more methods into the local code faster than when this switch is not used. The result is improved performance of the IDE runtime because more UI code will be compiled rather than interpreted. This value represents the number of times a method must be called before it is compiled.
*-J-XX:+USECONCMARKSWEEPGC-J-XX:+USEPARNEWGC
If there is an unexpected outage of garbage collection, try using these switches. This switch causes the JVM to use a different algorithm for the primary garbage collection event (if it is running on a multiprocessor workstation, but also for secondary reclamation events), which does not affect the entire garbage collection process. If you use the permsize switch, you should also add line-j-xx:+cmsclassunloadingenabled to the netbeans.conf file to enable class offload (when this collector is used, class offload is not enabled by default). Note: It is not yet determined whether this collector is improving or reducing the performance of a single-processor computer.
*-J-XX:+USEPARALLELGC
Some tests show that, at least in a single-processor system with a fairly good memory configuration, this recycling algorithm can reduce the duration of a secondary garbage collection by half. Note that this is a contradictory issue – in fact this collector is primarily suitable for multiprocessor systems with a gigabit heap. There is no data available to indicate its impact on major garbage collection. Note: This collector is mutually exclusive with-J-XX:+USECONCMARKSWEEPGC. Metrics data that supports the use of this algorithm can be found on the performance Web site.
*-j-xx:+useconcmarksweepgc-j-xx:+cmsclassunloadingenabled-j-xx:+cmspermgensweepingenabled, is optimized for garbage collection
More and more I feel that NetBeans is handy, but the recent death is always suspended, so I found this article on NetBeans optimization, did not expect the effect is obvious. Hey, if your netbeans is slow, you might as well try.