Generally, when you do not make relevant settings for eclipse, you will always feel that it is slow to start up and stuck when using eclipse. In fact, as long as you configure some relevant parameters of eclipse, there will be a big improvement.
Speed up startup
1. When eclipse starts, it will always search for the jre to run. It is often this search process that slows down eclipse startup. (When not set, wait 2-3 seconds for the progress bar to appear. After setting, the progress bar will appear directly)
Just add the -vm parameter to eclipse.ini
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/c366dd10-bdb4-464f-bab0-eb36c4dcb54d.jpg)
2. Cancel all plug-ins to be activated at startup (the same applies to activation during use) and other related operations performed at startup.
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/ea5f8436-5b67-44ff-88ee-300fe41934c1.jpg)
3. Turn off automatic updates
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/60e2118d-7352-4742-b921-e6b6f17a29a8.jpg)
Reduce eclipse card problems caused by jvm memory recycling
This is mainly because the JVM in client mode will stop all other work when recycling memory, and only perform other tasks after the recycling is completed. During this period, Eclipse will get stuck. Therefore, appropriately increasing the memory size requested by the jvm to reduce the number of recycling times or even not recycling it will significantly improve the carding problem.
Heap memory is mainly set through the following jvm parameters:
-The maximum total heap memory of -Xmn192m young heap memory, Sun official recommendation is 3/8 of the entire heap. The total heap memory = young heap memory + old heap memory + persistent heap memory young heap memory object is placed when it is first created. Here, the old heap memory objects will be placed here before they are actually recycled. The persistent heap memory class files, metadata, etc. are placed here -XX:PermSize=128m. The initial size of the persistent heap -XX:MaxPermSize=128m The maximum size of the persistent heap, eclipse defaults to 256m. If you want to compile jdk, you must set this to a large size because it has too many classes.
My configuration (laptop with 2g memory):
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/da2acb3a-0e5e-4965-933a-b0074238b692.jpg)
For other related parameters, you can check out the following reference materials, which are very enlightening:
-XX:+UseParallelGC uses concurrent memory collection
-XX:+DisableExplicitGC disables the explicit memory recycling of System.gc()
Eclipse related settings to reduce the card phenomenon
1. Turn off automatic build. When enabled, eclipse will automatically build the entire project for us every time we save it. This will cause a lag every time we save for large projects. In fact, automatic building is completely unnecessary. As long as you make sure to build it once before running, eclipse will also automatically build for us before running, so closing it is the wisest choice.
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/a3c9b48c-5658-4f4e-929d-eaaf2a6bab38.jpg)
2. Turn off spell check settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/d4db5eb0-6fa0-4991-b378-97d4aee4610d.jpg)
The help contents that come with eclipse (search for "Running Eclipse" to find startup-related configuration)
eclipse settings
The use of eclipse is detailed in its help file. You can generally find it there.
Code folding settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/9431cbd0-3f1b-475e-96af-f733e1b363e9.jpg)
Shortcut key settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/c278433b-2ca6-4db5-9089-1d3523245924.jpg)
Compiler error and warning settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/a2d528fd-8c09-46a9-94e3-2f1ec91cd767.jpg)
local history settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/6ccf6750-ab26-49ef-9521-292cbc72f6ef.jpg)
Code formatting settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/83c77fdd-3be5-4c79-9a5b-805aae7e589a.jpg)
Library settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/563a5b92-4a3f-47be-a41d-39bd7ca0727c.jpg)
Text editor settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/989a6492-ef75-4350-bf93-3d7d70eebf58.jpg)
Allow eclipse to start multiple instances
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/e69cdf70-0c87-4597-8e5c-a27be727d8d0.jpg)
Workspace settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/bb34b31b-2cb5-4451-8ff9-abc3d96cf7d0.jpg)
xml editor settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/406de742-b0b3-4ae9-991a-b448b80bd910.jpg)
Appearance settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/36f8dcc5-c2c9-4402-a471-5c47e94a6bc7.jpg)
Code formatting style settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/37f1f701-a1ec-4fbe-be4a-9bcf86349f72.jpg)
Prompt setting when mouse over code and so on
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/5eeaa4d0-3d6a-41da-aeaf-789b60c07f80.jpg)
Code hint settings
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/4273317d-2718-4ae9-a633-b45326298c91.jpg)
Template settings for generated files when creating new files
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/f07b999c-6761-4f38-a110-058f366a2d5b.jpg)
junit launcher settings. When developing Android, it is not possible to use the built-in launcher of Eclipse, you must use the one provided by Android.
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/14b2da53-c76a-4f14-a270-2c3e9ae04d9c.jpg)
eclipse use
file comparison
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/653fa005-5bef-4823-bafa-03e3f4886e3e.jpg)
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/d59adbc7-231a-4cf5-b0fa-d4ebb1a332b8.jpg)
Eclipse column editing mode
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/e7d48801-ee17-4e70-9db4-983f56e61cb2.jpg)
Search function (there is also Find/Replace)
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/4a31f1a0-945c-4186-b07f-5c212af16088.jpg)
Open a file multiple times so you don't have to scroll up and down when you need to refer to different parts of the file when writing code.
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/4418255e-9765-4040-907d-d993006bf977.jpg)
Extract public code into private public methods
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/c8c36a16-8710-4101-a557-b081188db07c.jpg)
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/6a04a891-bc67-477f-9f2e-7a746ed2f0f9.jpg)
///////////////////////////////////////////////////// //////////
eclipse debug usage part
///////////////////////////////////////////////////// //////////
The variable interface of debug displays the hexadecimal, ascii and other forms of elementary variables.
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/4ae0fee9-50b4-436d-9220-85e5b50b56fc.jpg)
///////////////////////////////////////////////////// //////////
Eclipse common problems and solutions
///////////////////////////////////////////////////// //////////
Eclipse 3.7 Indigo under Win7 and Vista, the text editor font cannot be changed to CourierNew! ! !
Edit directly
org.eclipse.jface_3.7.0.I20110522-1430.jar\org\eclipse\jface\resource\jfacefonts_windows7.properties
Replace it with the fonts in XP and restart Eclipse to fix it.
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/4271d1cf-a747-4f09-8cc6-154db58750b3.jpg)
After modification, enter the decompression 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
![](http://ttzixun.oss-cn-beijing.aliyuncs.com/ttzixun/pic/ce1152f4-85bf-4d05-8b38-1c140d3e2597.jpg)
Finally, overwrite the original jar file with the original one and restart eclipse. (The completed jar file will be downloaded at the end)
Articles are uploaded by users and are for non-commercial browsing only. Posted by: Lomu, please indicate the source: https://www.daogebangong.com/en/articles/detail/Eclipse-ru-he-jie-jue-qi-dong-man.html
评论列表(196条)
测试