Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to improve the start-up Speed of NetBeans

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to improve the startup speed of NetBeans. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

The purpose of NetBeans optimization is to improve the startup speed and running speed of NetBeans. The NetBeans optimization technique described below is optimized on the version of 6.0beta2. Through experiments, the start-up speed of NetBeans is greatly improved.

1. Modify the font size of the English netbeans interface, modify% Netbeans_home%\ etc\ netbeans.conf

Add-fontsize 13 to netbeans_default_options

2. Modify the JVM memory configuration (1G native memory, different memory sizes and different settings)

Add-J-Xmx512m to netbeans_default_options and modify-J-Xms256m at the same time.

[description]-J-Xms32m

This setting is used to tell the Java virtual machine to set its initial heap size to 32 MB. By telling JVM how much memory it should allocate to the heap in the first place, we can prevent it from growing the heap as IDE uses more memory.

[description]-J-Xmx128m

This setting is used to specify the * memory that the Java virtual machine should use for the heap. Setting a hard upper limit for this value means that the Java process cannot use more memory than the available physical RAM. This limit can be raised for systems with more memory-the 128 MB setting helps ensure that IDE operates reliably on 256MB's systems. Note: do not set this value to be close to or greater than the number of physical RAM in the system, or it will result in frequent swap space operations during the main recycling process.

3. Modify-J-XX:PermSize=20m in netbeans_default_options

This is a special JVM switch, but it also shortens the startup time. This setting is used to resize the "* area" in memory (where the class is saved). Since we know that all IDE classes take up a certain amount of memory, we prompt JVM about the amount of memory it will need. This setting eliminates major garbage collection events during startup on many systems. Users of SunONE Studio or other IDE that include more modules may want to set this value higher.

4, add-J-Xverify:none to the netbeans_default_options

This switch is used to turn off Java bytecode verification, speeding up class loading and eliminating the need to load classes only for validation purposes during startup. This switch will significantly shorten the startup time.

5. Remove the unwanted modules in 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 needs these modules, you don't need to remove them.

6. Modify the editor configuration

Remove all Javadoc pop-up windows, set all autocomplete delays to 0, and remove all autocomplete case sensitivity.

Note: by default, there is no delay setting for code completion in netbeans6's JAVA Code Editor settings. You can manually add to the properties.xml under the configuration file C:\ Documents and Settings\% USER_NAME%\ .netbeans\ 6.0beta2\ config\ Editors\ text\ x-java, and join

[description] the preperties.xml file does not exist by default and will not appear until you have modified the editor configuration.

As a rule of thumb, the Xmx should be set to half of the physical memory, and the initial heap size Xms should be 1 / 2 of Xmx, such as machines with 1 GB of memory, Xms256m, Xmx512m

The default PermSize of Netbeans5.5.1 is 160m. If you often encounter an exception of java.lang.OutOfMemoryError: PermGen space in your development, you can make this PermSize larger.

Some other JVM switches are listed below, which affect NetBeans performance more or less on some systems, but not all systems. Although using them will have some impact, it is still worth a try.

*-J-XX:CompileThreshold=100

This switch will increase startup time because HotSpot JVM compiles more methods into native code faster than if you don't use this switch. 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 can be compiled.

*-J-XX:+UseConcMarkSweepGC-J-XX:+UseParNewGC

If there is an unexpected interruption of garbage collection, try using these switches. This switch causes JVM to use different algorithms for major garbage collection events (or secondary collection events if running on multiprocessor workstations) that do not affect the entire garbage collection process. If you use the PermSize switch, you should also add a line-J-XX:+CMSClassUnloadingEnabled to the netbeans.conf file to enable class unloading (which is not enabled by default when using this recycler). Note: it is not clear whether this recycler will improve or degrade the performance of uniprocessor computers.

*-J-XX:+UseParallelGC

Some tests have shown that, at least in uniprocessor systems with fairly well configured memory, using this collection algorithm can halve the duration of secondary garbage collection. Note that this is a paradox-in fact, this collector is mainly suitable for multiprocessor systems with gigabyte heaps. There is no data available to show its impact on major garbage collection. Note: this collector and-J-XX:+UseConcMarkSweepGC are mutually exclusive. Metrics that support the use of this algorithm can be found on the performance Web site.

*-J-XX:+UseConcMarkSweepGC-J-XX:+CMSClassUnloadingEnabled-J-XX:+CMSPermGenSweepingEnabled, which optimizes garbage collection

More and more feel that netbeans is easy to use, but recently always fake death, so found this article to optimize the NetBeans, did not expect the effect is very obvious. Hey, hey, if your netbeans is slow, you might as well give it a try.

This is the end of the article on "how to improve the startup speed of NetBeans". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report