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

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

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


当前回答

对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的启动和退出。其中一个类似于Windows中的lookalike。禁用窗口动画和禁用启动活动可以在一定程度上加快窗口速度

类似于在eclipse中,我们可以有同样的东西Windows->一般->首选项->外观->关闭一些装饰选项。这可能会起到一点提振作用,但可能不会产生太大影响。

在我看来,你可能已经创建的工作空间中的项目应该限制在一定的范围内,如果项目更多,应该创建一个新的工作空间。例如,当您尝试在服务器上运行单个项目时,与在同一服务器上运行多个项目相比,它所花费的时间更少

通过增加堆空间和更改垃圾收集器设置来加速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,在这两种情况下,都注意到显著的加速。

我给了它大量的内存(在启动它的命令中添加一个- xmx开关),并尽量避免退出和重新启动它——我发现最严重的延迟是在启动时,所以给它大量的RAM可以让我在崩溃之前保持更长的时间。

除了为内存使用配置eclipse.ini之外。我已经通过“启动和关闭选项”进行了配置。我的月食现在燃烧得很快。

转到Windows ->首选项->验证,取消选中任何你不想要或不需要的验证器。

对于Eclipse 3.7,您使用Windows ->首选项->通用->启动和关机。