在 Mac 上使用 Android SDK,Eclipse 真的很慢。我怎样才能加快速度?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2787055/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 14:43:38  来源:igfitidea点击:

Using the Android SDK on a Mac, Eclipse is really slow. How can I speed it up?

androideclipsemacosperformance

提问by morais

I'm using Eclipse + the Android SDK on a Mac running Snow Leopard to develop Android apps.

我在运行 Snow Leopard 的 Mac 上使用 Eclipse + Android SDK 来开发 Android 应用程序。

Thing is, Eclipse is really slow - like, it "beach balls" for a few seconds when changing tabs.

问题是,Eclipse 真的很慢——比如,它在改变标签时会“沙滩球”几秒钟。

Is there anything I can do to improve it's performance?

有什么我可以做的来提高它的性能吗?

回答by morais

The solution: change the Java version used and increase the allocated memory.

解决办法:改变使用的Java版本,增加分配的内存。

Edit eclipse.ini - this file is located Eclipse.app/Contents/MacOS/eclipse.ini.

编辑 eclipse.ini - 此文件位于 Eclipse.app/Contents/MacOS/eclipse.ini。

Change the following vars to use Java 1.6 and allocate more memory:

更改以下变量以使用 Java 1.6 并分配更多内存:

-Dosgi.requiredJavaVersion = 1.6
-Xms128m
-Xmx1024m

(Found originally here: http://www.codeweblog.com/eclipse-adt-mac-version-tab-to-switch-slow-solution/)

(最初在这里找到:http: //www.codeweblog.com/eclipse-adt-mac-version-tab-to-switch-slow-solution/

回答by Prashast

You can try some suggestions from this IBM developerWorks article

您可以从这篇IBM developerWorks 文章中尝试一些建议

Search for the "Maximizing Eclipse performance on Mac OS X" section

搜索“在 Mac OS X 上最大化 Eclipse 性能”部分

回答by eric.wasylishen

Switching from the 64-bit to the 32-bit version of Eclipse made a big improvement to UI responsiveness for me. Try Eclipse Classic 4.2 32-bit from http://www.eclipse.org/downloads. I'm using the "Java 6 SE (System) 32-bit" JVM in OS X 10.8.1.

从 64 位版本切换到 32 位版本的 Eclipse 对我来说对 UI 响应能力有很大的改进。从http://www.eclipse.org/downloads尝试 Eclipse Classic 4.2 32 位。我在 OS X 10.8.1 中使用“Java 6 SE(系统)32 位”JVM。

Tab switching, opening context menus, and opening java files went from sometimes over a second to nearly instant after this change.

在此更改后,选项卡切换、打开上下文菜单和打开 java 文件从有时超过一秒变为几乎立即。

I've tried a lot of suggestions over the past few months, including upgrading from 2 to 6 GB RAM, upgrading to an SSD, -Dosgi.requiredJavaVersion=1.6, setting various maximum heap sizes from 1 to 4 GB, various 64-bit JVM's - Apple's Java 6 SE, Java SE 7, Java SE 8, and none of these fixed the stalling problem.

在过去的几个月里,我尝试了很多建议,包括从 2 GB RAM 升级到 6 GB、升级到 SSD、-Dosgi.requiredJavaVersion=1.6、将各种最大堆大小设置为 1 GB 到 4 GB、各种 64 位JVM's - Apple 的 Java 6 SE、Java SE 7、Java SE 8,这些都没有解决停顿问题。

回答by Keldon Alleyne

I've been running Eclipse under a virtual machine. I've found VMWare to provide the best performance, but VirtualBox is the only one that consistently displays WebGL correctly in the browser (if that is important to you).

我一直在虚拟机下运行 Eclipse。我发现 VMWare 可提供最佳性能,但 VirtualBox 是唯一一种在浏览器中始终正确显示 WebGL 的工具(如果这对您很重要)。

For the record, a virtual machine running Windows or Linux yields better Eclipse performance than running Eclipse on OSX. I've tried all of those settings and the tab switching speed is just too slow. I did some timings and it's just not something I can work with as it drives me absolutely crazy.

作为记录,运行 Windows 或 Linux 的虚拟机比在 OSX 上运行 Eclipse 产生更好的 Eclipse 性能。我已经尝试了所有这些设置,但选项卡切换速度太慢了。我做了一些计时,这不是我可以使用的,因为它让我非常疯狂。

Configuration:

配置:

  • OSX 10.7.5
  • 4GB Ram
  • 2.0 Ghz Core 2 Duo
  • OSX 10.7.5
  • 4GB 内存
  • 2.0 Ghz Core 2 Duo