Java 为什么 Eclipse IDE 越来越慢?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1216840/
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
Why is the Eclipse IDE getting slower?
提问by Roy Marco Aruta
I have downloaded the latest Eclipse IDE, Galileo, and tested it to see if it good for developing web applications in Java. I have also tried the Ganymede version of Eclipse and find that is it also good.
我已经下载了最新的 Eclipse IDE Galileo,并对其进行了测试,看它是否适合用 Java 开发 Web 应用程序。我还尝试了 Eclipse 的 Ganymede 版本,发现它也不错。
My Problem is that sometimes it hangs and stops responding while I am developing. Sometimes when I open a file, Eclipse hangs and does not respond for awhile. It seems that Eclipse is going slower and my job is getting slower because of the time that I am spending waiting for the response of Eclipse.
我的问题是有时它会在我开发时挂起并停止响应。有时,当我打开一个文件时,Eclipse 会挂起并且有一段时间没有响应。Eclipse 似乎变慢了,我的工作也变慢了,因为我花时间等待 Eclipse 的响应。
When I went to NetBeans 6.7, it was good and the performance was good. The loading is faster and the IDE responds well during my development testing.
当我去NetBeans 6.7时,它很好,性能也不错。在我的开发测试期间,加载速度更快,IDE 响应良好。
My computer has 1 GB of RAM and a 1.6 GHz CPU.
我的电脑有 1 GB 的 RAM 和一个 1.6 GHz 的 CPU。
What can you say about this?
对此你有什么想说的?
采纳答案by Pascal MARTIN
I'm using Eclipse PDT 2.1 (also based on Galileo) for PHP development, and I've been using Eclipse-based IDE for 3 years now ; my observation is that 1 GB of RAM is generally not enough to run Eclipse + some kind of web server + DB server + browser + other stuff :-(
我正在使用 Eclipse PDT 2.1(也基于 Galileo)进行 PHP 开发,并且我已经使用基于 Eclipse 的 IDE 3 年了;我的观察是 1 GB 的 RAM 通常不足以运行 Eclipse + 某种 Web 服务器 + DB 服务器 + 浏览器 + 其他东西:-(
I'm currently working with a 1GB of RAM machine, and it's slow as hell... Few months ago, I had a 2GB of RAM machine, and things were going really fine -- and I'm having less software running on the "new machine" than I had on the other one !
我目前正在使用 1GB RAM 的机器,它慢得要命……几个月前,我有一台 2GB 的 RAM 机器,一切都很好——而且我在机器上运行的软件越来越少“新机器”比我在另一台上的还多!
Other things that seem to affect Eclipse's responsivness is :
其他似乎影响 Eclipse 响应性的事情是:
- opening a project that's on a network drive (accessing the sources that are on a development server via samba, for instance)
- sometimes, using an SVN-plugin like SUbversive seems to freeze Eclipse for a couple of seconds/minutes
- 打开网络驱动器上的项目(例如,通过 samba 访问开发服务器上的源)
- 有时,使用像 SUbversive 这样的 SVN 插件似乎会使 Eclipse 冻结几秒/分钟
A nice to do with languages like PHP (might not be OK for JAVA projects, though) is to disable "automatically build" in "project"'s menu.
使用像 PHP 这样的语言(可能不适用于 JAVA 项目)的一个好处是禁用“项目”菜单中的“自动构建”。
As a sidenote : I've already seen questions about eclipse's speed on SO ; you might want to try so searches, to get answers faster ;-)
作为旁注:我已经在 SO 上看到了有关 eclipse 速度的问题;您可能想尝试搜索,以更快地获得答案;-)
回答by akf
This is a common concern and others have posted similar questions. There are optimizations that you can perform on your Eclipse environment. Take a look at the solutions posted here.
回答by KLE
Our machines are bigger : 2GB ram, and faster CPU.
我们的机器更大:2GB 内存和更快的 CPU。
I'm sure that, as all software, Eclipse gets bigger and slower when upgrading version, due to all new functionnalities included. The good news is that from time to time, a release also brings some notable performance improvement. But in my experience, each time I tried using a ten-year old software on my current machine, it was lightning fast, so I'm sure the tendency is to get slower. I agree that this is a sad for us, when we don't get a better machine.
我敢肯定,与所有软件一样,由于包含所有新功能,Eclipse 在升级版本时会变得越来越大。好消息是,不时的发布也会带来一些显着的性能改进。但根据我的经验,每次我尝试在我当前的机器上使用一个 10 年前的软件时,速度都快如闪电,所以我确定趋势是变慢。我同意这对我们来说是一种悲哀,因为我们没有得到更好的机器。
There might be some things you can do, to improve the responsiveness of your Eclipse. I don't know if you already tried everything ... ?
您可能可以做一些事情来提高 Eclipse 的响应能力。我不知道你是否已经尝试了一切......?
回答by Nosredna
My experience has been that NetBeans, Aptana, and Komodo are fast on computers where Eclipse is painfully slow. Maxing out RAM has seemed to help. Any chance you can bump up to 2 gig?
我的经验是 NetBeans、Aptana 和 Komodo 在 Eclipse 非常缓慢的计算机上运行很快。最大化 RAM 似乎有所帮助。你有机会增加到 2 场演出吗?
回答by Bill K
Netbeans sped up quite a bit in the last few years, perhaps your comparison is relative to the speed of netbeans?
Netbeans 在最近几年加速了很多,也许你的比较是相对于 netbeans 的速度?
Lately I had to up the size of my eclipse -Xmx from 64mb and decided I might as well go to 512, and it got a bit chunkier. at 64 I never saw the slightest pause, when it actually NEEDS a collection at 512 because of a long-running process that's not letting the background GC thread run, it can get a little pausey
最近我不得不将我的 eclipse -Xmx 的大小从 64mb 增加,并决定我最好还是去 512,它变得有点笨重。在 64 时,我从未看到丝毫的停顿,当它实际上在 512 时需要一个集合时,因为一个长时间运行的进程不允许后台 GC 线程运行,它可能会有点停顿
I'm running on a pretty old version of eclipse (customized by the cable industry so it can run and display cable apps on a TV emulator) so your mileage may vary.
我正在运行一个相当旧版本的 eclipse(由有线电视行业定制,因此它可以在电视模拟器上运行和显示有线电视应用程序),因此您的里程可能会有所不同。
回答by cV2
netbeans is really damn hot, i just didn get it to automatically release my android projects...
netbeans 真的很火爆,我只是没有让它自动发布我的 android 项目......
thinking of features.. i'd prefere eclipse...
考虑功能......我更喜欢日食......
to fasten it up a little more, just disable 'automatic build' doesnt really change anything (build just takes a little longer)
把它固定得更紧一点,只是禁用“自动构建”并没有真正改变任何东西(构建只需要更长的时间)
but it's really feelable faster...
但感觉真的快了...
but, after 1 or 2 hours, i also have to close, wait, and re-open it.
但是,1 或 2 小时后,我还必须关闭、等待并重新打开它。
kind of sucks... (gotta macbook pro, 2.26 (i think) ghz, 3gb ram, gave it a minimum of 768MB of ram, and keeps getting slower..
有点糟糕......(必须使用 macbook pro,2.26(我认为)ghz,3gb ram,给它至少 768MB 的 ram,并且越来越慢..
really sucks
真的很烂
::edit:: I also realized, that after opening a XML file, eclipse instantly gets a little bit more laggy (already disabled XML live compiling, or something similiar, makes no difference :( )
::edit:: 我也意识到,在打开 XML 文件后,eclipse 会立即变得更加滞后(已经禁用 XML 实时编译或类似的东西,没有区别:()