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

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

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


当前回答

又有一个解决方案 删除这两个文件夹中的所有文件

.metadata.plugins \ org.eclipse.core.resources.history .metadata.plugins \ org.eclipse.jdt.core

这是第一次帮助。但它仍然保持缓慢

其他回答

好吧,如果您正在使用Eclipse开发GWT应用程序,那么方法如下:

Eclipse中的内存不足错误

还记得将相同的VM参数添加到托管模式配置中。

对Eclipse速度影响最大的三个因素是:

使用最新版本的Eclipse(2020-06截至2020年6月26日) 请注意David balaicic的评论(2014年7月)与六年前的标准相矛盾:

Indigo (3.7.2) SR2中“相同”的工作空间在4秒内加载,Kepler SR2(4.3.2)在7秒内加载,Luna(4.4.0)在10秒内加载。它们都是Java EE包。新版本有更多捆绑的插件,但趋势仍然很明显。(我所说的“相同”工作空间是指:使用相同的(额外安装的)插件,从版本控制中检出相同的项目)。

使用最新的JDK启动它(在撰写本文时使用Java 14,这并不妨碍您在Eclipse项目中使用任何其他您想要的JDK: 1.4.2、1.5、1.6旧版本……) vm jdk1.6.0_10 \ jre \ bin \ client \ jvm.dll 配置eclipse.ini(有关完整的eclipse.ini,请参阅这个问题) -Xms512m -Xmx4096m […]

Xmx参数是Eclipse将获得的内存量(简单来说)。使用-Xmx4g,它可以获得4gb的RAM,等等。


注意:

引用jvm.dll有以下优点:

启动画面很快就会出现。 进程列表中的Eclipse.exe,而不是java.exe。 防火墙:Eclipse需要访问Internet而不是Java。 窗口管理品牌问题,特别是在Windows和Mac上。


2020年12月,Udo符合评论

From version 4.8 (Photon) an up there was a steady speed gain after each version. The main platform was optimized every release to load faster, enable more features for the dark theme and to add more features for newer Java versions for the Java development tools. Especially with-in the last 3 versions the startup time was increased a lot. There should be a significant increase in start-up time with the newest version of Eclipse 2020-12. In my experience it started a lot faster with each new version. But: There are still plug-ins which do not follow the new way of using the Eclipse API and are therefore still slow to start. Since the change to Java 11 as the minimum runtime version starting from Eclipse version 2020-09 at least the core system uses the newer features of the JVM. It is up to the providers of the other plug-ins to upgrade to newer APIs and to use the full power of modern CPUs (e.g. concurrent programming model).

另请参阅

为Eclipse提供正确数量的线程和正确数量的内存:问题:Eclipse和Eclipse索引器占用了我所有的资源/ CPU%

在eclipse.ini文件中添加-Xverify:none。

它将大大缩短Eclipse启动时间(对我来说是50%,如果不是更多的话)。这将告诉VM不要验证它正在加载的所有.class文件。

考虑一下:永远不要在生产系统中禁用字节码验证 (如评论所述)

除了最新的软件(最新的Eclipse和Java)和更多的RAM,您可能还需要

删除不需要的插件(并非所有插件都需要Mylyn和Eclipse的J2EE版本) 不必要的验证器 禁用拼写检查 关闭Java编辑器中未使用的选项卡(是的,它有助于减少Eclipse负担) 关闭未使用的项目 禁用不需要的标签声明(SVN/CVS) 禁用自动建筑

参考:making-eclipse-ide-faster

                       **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'.