如何使使用Eclipse的体验更快?

例如:我禁用了所有我不需要的插件(Mylyn, Subclipse,…)

我没有为Mercurial使用插件,而是将TortoiseHG配置为一个外部工具。


当前回答

通过增加堆空间和更改垃圾收集器设置来加速Eclipse,我尝试了许多方法。

但就我的本地开发而言,我认为禁用JVM垃圾收集器最适合我。

Mylyn的自动补全功能工作起来没有问题,(未响应)部分已被显著地最小化。

下面是eclipse.ini文件的快照。

-vm
--C:\JAVA\jre\bin\server\jvm.dll
C:\JAVA8x64\jre\bin\server\jvm.dll
-vmargs
-Xnoclassgc
-Dosgi.requiredJavaVersion=1.6
-Xms256m
-Xmx1024m

我尝试过使用JDK 6和JDK 8,在这两种情况下,都注意到显著的加速。

其他回答

禁用病毒扫描程序,或至少将任何病毒扫描程序配置为在读访问时不扫描JAR文件。

如果Eclipse运行缓慢,我遵循以下几个步骤:

Any unused plugins installed in Eclipse, should uninstall them. -- Few plugins makes a lot much weight to Eclipse. Open current working project and close the remaining project. If there is any any dependency among them, just open while running. If all are Maven projects, then with miner local change in pom files, you can make them individual projects also. If you are working on independent projects, then always work on any one project in a workspace. Don't keep multiple projects in single workspace. Change the type filters. It facilitates to specify particular packages to refer always. As per my experience, don't change memory JVM parameters. It causes a lot of unknown issues except when you have sound knowledge of JVM parameters. Un-check auto build always. Particulary, Maven project's auto build is useless. Close all the files opened, just open current working files. Use Go Into Work sets. Instead of complete workbench. Most of the components of your application you can implement and test in standalone also. Learn how to run in standalone without need of server deploy, this makes your work simple and fast. -- Recently, I worked on hibernate entities for my project, two days, I did on server. i.e. I changed in entities and again build and deployed on the server, it killing it all my time. So, then I created a simple JPA standalone application, and I completed my work very fast.

努力配置您的构建路径。如果代码完成需要遍历整个项目文件夹,则会占用大量内存。

右键单击项目并选择首选项。 选择生成路径设置并删除项目文件夹。 然后只添加包含源代码和库代码的文件夹。

                       **Tips for making Eclipse IDE Faster**

Eclipse在处理小型项目时运行得更快。但是当你不得不处理一个大项目时,你会对它的速度感到恼火。即使有一个巨大的RAM,你也不会满意它 速度。以下步骤将帮助eclipse提高其速度

Remove unwanted activation of some of the plugins at start-up by going to windows–>preference–>General–>Startup and shutdown also make sure you don’t use those plugins in any of your views Disabling label decorations which is of less use for you, will also help you to gain some performance . Go to Windows–>Preference–>General–>Appearance–>Label -> Decorations Close unwanted projects and use working set option to move from one group of project to another smoothly. Configure eclipse.ini which will be available in the eclipse installed location.

   Configuring eclipse.ini should be based on your RAM
   -Xms256m
   -Xmx512m
   -XX:PermSize=512m
   -XX:MaxPermSize=512M

也可以访问http://wiki.eclipse.org/Eclipse.ini获取更多选择 配置eclipse.ini。

Do not keep lot of tabs opened in the editor. Better to have around 20 tabs . Regularly close the unused tabs. To open resource we can always use ctrl+shift+R and ctrl+shift+T (java resource) instead of opening lot of tabs I experienced a considerable improvement in performance when limiting the number of open tabs (In the past I frequently had 30+ tabs open). You can let eclipse handle this for you automatically: Window->Preferences->Editors-> close editors automatically 8 open tabs is the amount before the >> sign appears, so I set 14 as my default value. When opening more tabs, the ones the least recently accessed will be closed. When all editors are dirty or pinned. If it has unsaved modifications you can prompt to save & reuse (tab will be closed, a new one will be opened in its place). Or you can open a new editor end thus increase the amount of open tabs (the unobtrusive choice). If you want to ensure some tabs never get closed autmatically, you can pin them. This by clicking on the pin icon (the rightmost icon in the toolbar, with “pin editor” as tooltiptext). Go to Windows -> Preferences -> Validation and uncheck any validators you don’t want or need. Go to Windows -> Preferences -> General -> Appearance -> and uncheck any animation you don’t want or need. Go to Windows -> Preferences -> Maven and check 'do not automatically update dependencies'.

当限制打开标签的数量时(过去我经常打开30多个标签),我的性能有了相当大的提高。您可以让Eclipse自动为您处理这个问题:

窗口->首选项->编辑器->自动关闭编辑器

8个打开的标签是>>符号出现之前的金额,所以我倾向于让它保持在8。

当打开更多选项卡时,最近最少访问的选项卡将被关闭。

->当所有编辑器都是脏的或固定的

如果它有未保存的修改,你可以提示保存和重用(标签将被关闭,一个新的将被打开在它的地方)。或者你可以打开一个新的编辑器,从而增加打开标签的数量(不显眼的选择)。

如果你想确保一些标签永远不会自动关闭,你可以钉住它们。点击大头针图标(工具栏中最右边的图标,以“大头针编辑器”为tooltiptext)。