Set, optimize, and use eclipse

Source: Internet
Author: User

When you do not configure eclipse, you will always feel slow to start and use eclipse. In fact, you only need to configure eclipse-related parameters, there will be great improvements.
Faster startup 
1. When eclipse is started, it will always search for the JRE that will run it. This search process often slows down eclipse startup. (When no progress is set, the progress bar appears after 2-3 seconds)

You only need to add the-VM parameter to eclipse. ini.

2. Cancel all plug-ins to be activated at startup (the same is true when activated) and other related operations at startup.
 

3. Disable Automatic Updates.

Reduce eclipse card problems caused by JVM memory reclaim 
This is mainly because when JVM is in the client mode, it will stop all other tasks and execute other tasks only after the collection is completed. During this period, eclipse gets stuck. Therefore, if you increase the memory size applied by JVM to reduce the number of times it is recycled or even not, the card effect will be significantly improved.

The following JVM parameters are used to set the heap memory:

-Xmx512m Maximum total heap memory, generally set to 1/4 of the physical memory
-Xms512m The initial total heap memory is usually set as large as the maximum heap memory, so you do not need to adjust the heap size based on the current heap usage.
-Xmn192m Young with heap memory, Sun officially recommends 3/8 of the total heap memory
Heap memory Composition Total heap memory = Young with heap memory + old with heap memory + persistent with heap memory
Young with heap memory Put the object here when it is just created
Old with heap memory Objects are placed here before they are actually recycled.
Persistent memory with heap Put the class file and metadata here.
-XX: permsize = 128 m Initial persistent heap size
-XX: maxpermsize = 128 m The maximum persistent heap size. The default value of eclipse is 256 MB. If you want to compile JDK, you must set it very large because it has too many classes.


My configuration (2 GB memory notebook ):
 
You can also take a look at the following reference materials for other relevant parameters, which are very enlightening:
-XX: + useparallelgc uses concurrent memory reclaim
-XX: + disableexplicitgc: Disable the Display memory Recycle of system. GC ().

Eclipse-related settings to reduce card usage 
1. Disable Automatic build. When it is enabled, eclipse will automatically build the entire project for us every time it is saved. This will cause a lot of trouble for large projects every time it is saved. In fact, automatic building is completely unnecessary. It is okay to build it once before running, and eclipse will automatically build for us before running, so closing is the smartest choice.
 

2. Disable spelling check settings

Other optimization links 
Http://wcgdonot.iteye.com/blog/1380429

References 
JVM startup parameters:Http://www.blogjava.net/midstr/archive/2008/09/21/230265.html 
Knowledge about the JVM structure (the heap composition ):Http://hllvm.group.iteye.com/group/wiki/2905-JVM 
JVM heap knowledge:Http://ruijf.iteye.com/blog/1028455 
Eclipse startup optimization:Http://www.iteye.com/topic/756538 
Eclipse's help contents (search for "Running Eclipse" to find startup-related configurations)

Eclipse settings 
The use of eclipse is detailed in its help file, which can be found over there.
CodeFolding settings 

Shortcut Key settings 

Compiler Errors and warning settings 

Local History settings 
 

Code formatting settings 

Library settings 

Text Editor settings 

Enable eclipse To Start Multiple instances 
 

Workspace settings 
 

XML editor settings 

Appearance settings 

Code formatting style settings 
 

Prompt settings when the mouse is over the code 

Code prompt settings 

Template settings for generating files when creating a new file 

JUnit launcher settings. When developing Android, it is not possible to use the built-in launcher of Eclipse, which must be provided by Android. 
 

Use eclipse 
File comparison 
 

Eclipse column editing mode 

Search function (find/replace) 
 

Open a file multiple times, so you do not need to roll it up and down when you need to refer to different parts of the file when writing code. 

Extract public code to private public methods 

 

Eclipse plug-ins that display the startup time:
HereHttp://www.blogjava.net/shenh062326/archive/2011/10/16/361360.html 

//////////////////////////////////////// ////////////////////
Eclipse debug 
//////////////////////////////////////// ////////////////////
The variable interface of DEBUG displays the hexadecimal and ASCII forms of elementary variables. 

////////////////////////////////// //// //
eclipse FAQs and solutions
//////// //////////////////////////////////////// //////////
eclipse 3.7 Indigo is under win7 and Vista, the text editor font cannot be changed to couriernew !!!
edit
Org. eclipse. jface_3.7.0.I20110522-1430.jar \ org \ eclipse \ jface \ resource \ jfacefonts_windows7.properties
Replace the font in XP and restart eclipse.
after modification, enter the extract directory
E:
Cd Org. eclipse. jface_3.7.0.I20110522-1430

Then package all the files
Jar-CFM org. Eclipse. jface_3.7.0.I20110522-1430.jar "META-INF/manifest. MF" "org/" "META-INF/". api_description about.html plugin. Properties
 
Finally, overwrite the original JAR file and restart eclipse. (Complete JAR file download at the end)

Exception in checkandloadtargetdata. permgen space solved 
Http://hi.baidu.com/marsjin/blog/item/60756189fa65e4b00f244494.html

Error policying a preference change listener 
This error indicates that the eclipse CDT plug-in is too old. You only need to delete the CDT plug-in under plugin to solve this problem.

Http://www.velocityreviews.com/forums/t361244-eclipse-error-notifying-a-preference-change-listener.html:

Start eclipse, the prompt "failed to create the Java Virtual Machine"
may be the eclipse/eclipse configuration file. INI
-xms512m
-xmx512m
is too large, set a smaller value, such as 256

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.