Eclipse 变得太慢 - 工作区娱乐有帮助
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4386119/
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
Eclipse getting too slow - workspace recreation helped
提问by Daniel
My Eclipse was getting slower and slower over time. Tips I found on the Internet did not help. What I did is completely deleted my workspace, created new one and reimported all my projects into the new workspace and this really made the difference.
随着时间的推移,我的 Eclipse 变得越来越慢。我在互联网上找到的提示没有帮助。我所做的是完全删除了我的工作区,创建了新的工作区并将我的所有项目重新导入到新的工作区中,这确实有所不同。
So my question is whether it's possible to perform this workspace clean-up without deleting and recreating workspace... Maybe there is some cache in workspace which is getting big? Any ideas?
所以我的问题是是否可以在不删除和重新创建工作区的情况下执行此工作区清理...也许工作区中有一些缓存正在变大?有任何想法吗?
Thank you!
谢谢!
回答by rustyx
Eclipse keeps track of all changes in local history. That might introduce slowdown over time.
Local history is located at .metadata/.plugins/org.eclipse.core.resources/.history
.
Eclipse 会跟踪本地历史记录中的所有更改。随着时间的推移,这可能会导致放缓。本地历史位于.metadata/.plugins/org.eclipse.core.resources/.history
。
回答by Julijus
Not sure about newer versions of eclipse, but in 3.1 settings in
不确定较新版本的 eclipse,但在 3.1 设置中
Preferences->General->Workspace->Local history
Preferences->General->Workspace->Local history
did not work for me. I had it set by default to 7 days but files were kept for 4 years. And I guess other people here had the same issue.
对我不起作用。我将其默认设置为 7 天,但文件保留了 4 年。我猜这里的其他人也有同样的问题。
For me it helped to remove history files manually from
对我来说,它有助于手动删除历史文件
.metadata/.plugins/org.eclipse.core.resources/.history.
回答by user980717
I use RAD 7.5 (which is based off of Eclipse 3.4). I found several of my projects had millionsof history files, all older than 7 days, and mostly the same dummy MANIFEST.MF file (39 bytes).
我使用 RAD 7.5(基于 Eclipse 3.4)。我发现我的几个项目有数百万个历史文件,都超过 7 天,而且大部分是相同的虚拟 MANIFEST.MF 文件(39 字节)。
I discovered this when I tried to delete an old project with Windows Explorer. After 12 hours, Windows Explorer reported that it had recycled 3.5 million files, and was still working.
我在尝试使用 Windows 资源管理器删除旧项目时发现了这一点。12 小时后,Windows 资源管理器报告它已回收了 350 万个文件,并且仍在工作。
I found the only way to remove the workspace was to open a Command Window, CD to
我发现删除工作区的唯一方法是打开一个命令窗口,CD
<project>\.metadata\.plugins\org.eclipse.core.resources\.history
then type
然后输入
DEL *.* /s/q
Even this took the better part of an hour.
甚至这也花了一个小时的大部分时间。
回答by Boris Pavlovi?
Try running eclipse from command prompt with
尝试从命令提示符运行 eclipse
eclipse.exe -clean
More http://www.myeclipseide.com/PNphpBB2-viewtopic-t-10280.html
更多http://www.myeclipseide.com/PNphpBB2-viewtopic-t-10280.html
回答by Hasnain Ali Bohra
Sometimes due to Physical Memory issue it cant build the workspace. So To remove Memory issues update @
有时由于物理内存问题,它无法构建工作区。所以要删除内存问题更新@
eclipse.ini
eclipse.ini
file as below
文件如下
-Xms512m
-Xmx1024m
-XX:MaxPermSize=1024m
--launcher.XXMaxPermSize 1024m
回答by not-an-eclipse-developper
Eclipse is programmed as a filebomb, and it causes a large variety of problem, evben on modern robust filesystem. Problem can goes from large waste of diskspace for nothing to preventing your OS to boot if your workspace is on your OS partition. Eclipse is programmed as a filebomb.
Eclipse 被编程为文件炸弹,它会导致各种各样的问题,尤其是在现代强大的文件系统上。如果您的工作区在您的操作系统分区上,问题可能会从大量浪费磁盘空间到阻止您的操作系统启动。Eclipse 被编程为文件炸弹。
The cleanup mechanism in eclipse doesn't work, so the only viable option is to frequently cleanup your workspace by hand at regular interval, or to add your cleanup code to a sh file that does it before launching eclipse.
eclipse 中的清理机制不起作用,因此唯一可行的选择是定期手动清理工作区,或者将清理代码添加到 sh 文件中,以便在启动 eclipse 之前执行此操作。
An other option will be to introduce the eclipse developpers to the fabulous world of databases that produce faster to run and easier to write code. Sadly a rhumor says that they will shot on sight everyone that pronounce the words "sqlite" or "jdbc", and will sacrifice virgind every sunday to the all-mighty-god-of-filebombs.
另一种选择是向 Eclipse 开发人员介绍令人难以置信的数据库世界,这些数据库可以更快地运行和更容易编写代码。可悲的是,有传言说他们会开枪射击所有发音为“sqlite”或“jdbc”的人,并且每个星期天都会将处女献祭给万能的文件炸弹之神。
回答by vivi
I just solve the problem by deleting all stuffs inside eclipse's directory OPTReplica. after that, re-stat eclipse, for me it helps.
我只是通过删除 eclipse 目录 OPTReplica 中的所有内容来解决问题。之后,重新统计日食,对我来说有帮助。