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

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

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


当前回答

我已经禁用了Windows > Preferences > General中所有未使用的选项,它对性能有巨大的积极影响,eclipse在切换选项卡时仍然很慢,我不想增加内存,但在滚动时要快得多。谢谢你的提示。

其他回答

试试这些。有两种方法。

第一个过程

参考这篇文章。

http://www.javacodegeeks.com/2014/06/the-real-way-to-make-eclipse-run-faster-on-ubuntu.html

第二个过程。

在终端执行命令。

ramdisk

为Ubuntu获得更好的性能和更快的响应。

Ramdisk是系统内存的一部分。Ubuntu默认使用物理内存(RAM)的一半作为ramdisk,并将其挂载到RAM上

/dev/shm

,它可以像普通磁盘空间一样使用(创建文件和文件夹,并以更好的性能操作它们,而不是将它们存储在硬盘上)。如果ramdisk使用了超过一半的RAM,则数据将被转移到交换空间。如果ramdisk使用更少的内存,剩余的内存仍然可以做RAM正在做的事情。

设置ramdisk上限

如上所述,默认情况下,ramdisk可以使用一半的RAM。如果您想更改上限,请执行以下步骤:

使用您最喜欢的编辑器编辑/etc/fstab: Gksudo gedit /etc/fstab .使用实例 找到这一行并更改它使其看起来像这样(如果不存在则添加这一行,并将512M更改为您喜欢的内容): tmpfs /dev/shm tmpfs默认值,size=512M 0 0 重启或重新挂载 /dev/shm

将/tmp挂载到ramdisk上

为了便于使用,可以将目录挂载到

/dev/shm

通过以下命令:

mkdir /dev/shm/tmp

chmod 1777 /dev/shm/tmp

绑定/dev/shm/tmp /tmp

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

对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之外。我已经通过“启动和关闭选项”进行了配置。我的月食现在燃烧得很快。

我也遇到过类似的减速,这个修复只适用于使用Eclipse的C/ c++变体的情况。对于C/ c++,你可能想要禁用索引器,它以占用CPU而闻名。它相当于VS智能感知。 要禁用CDT索引器,请进入Window->Preferences,在C/ c++选项卡下选择indexer并取消选中启用索引器。