ubuntu 16.04 更新后 Eclipse Mars 太慢了

Eclipse Mars is too slow after ubuntu 16.04 update

java 进程几乎用掉了 CPU 的 150%。我也在 eclipse.ini 中增加了内存,删除了不必要的插件,禁用了拼写检查、格式化等。

还是很慢。

我在使用 Linux 16.04 和 Mars.2

时遇到了这个问题

这个问题是已知的,并且在此处有详细记录。 https://bugs.eclipse.org/bugs/show_bug.cgi?id=430736#c35

本质上是火星使用的 GDK 和 Ubuntu/Deb 中的内容存在问题。

修复很简单,将以下内容添加到您的 Eclipse.ini

--launcher.GTK_version
2

如果你的下一个问题是。我在哪里添加这两行?这是一个示例文件,您的可能有所不同,但它显示了在何处添加上述内容。

$ cat eclipse.ini 
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.cpp.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.GTK_version
2
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XX:MaxPermSize=256m
-Xms40m
-Xmx1536m