Eclipse 刷新工作区需要永远
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1359704/
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 refreshing workspace takes forever
提问by Luke
When I start up Eclipse, ready to rock, I have to sit there and wait for like 5 or 6 minutes until Eclipse get its sh*t together, "Refreshing workspace... (13%)" it states in the status bar while Eclipse is completely frozen.
当我启动 Eclipse,准备好摇滚时,我必须坐在那里等待大约 5 或 6 分钟,直到 Eclipse 将其组合在一起,“正在刷新工作区...(13%)”它在状态栏中指出Eclipse 完全冻结。
Is there any way to turn this off or at least speed this "refreshing" up?
有什么办法可以关闭它或至少加快这种“刷新”的速度?
UPDATE:
更新:
It turns out that the solution was quite easy to resolve by closing projects that where not in use. I currently have about 25 projects and almost all of them are Subversion check-outs. I think that on start-up Eclipse will scan through all open/active projects and do some synchronization of some sort. Closing projects that I'm currently not working on drasticallyspeeded up launching Eclipse.
事实证明,通过关闭不使用的项目,解决方案很容易解决。我目前有大约 25 个项目,几乎所有项目都是 Subversion 检出项目。我认为在启动时 Eclipse 将扫描所有打开/活动的项目并进行某种同步。关闭我目前没有处理的项目大大加快了 Eclipse 的启动速度。
采纳答案by Pascal MARTIN
There are a couple of questions/answers on SO that might help you :
有几个关于 SO 的问题/答案可能对您有所帮助:
- Tricks to speed up Eclipse
- How to speed up the eclipse project ‘refresh'; I'm using the filesyncplugin suggested there every day, and it's a real pleasure : 10 seconds for an SVN update, instead of 5 to 8 minutes (my files being on a network drive); same when launching Eclipse, as it was the "project refresh" that took time, exactly like you described.
- Eclipse optimizations
- 加速 Eclipse 的技巧
- 如何加速eclipse项目“刷新”;我每天都在使用那里建议的文件同步插件,这真是一种乐趣:10 秒即可进行 SVN 更新,而不是 5 到 8 分钟(我的文件位于网络驱动器上);启动 Eclipse 时也是如此,因为它是需要时间的“项目刷新”,就像您描述的那样。
- Eclipse 优化
Maybe those posts will help you at least a bit :-)
也许这些帖子至少会对你有所帮助:-)
If not : can you tell us a bit more about your set up ? Which plugins are you using, how big are your projects, which OS do you use, what kind of computer (CPU, RAM, ...) do you use ...
如果不是:你能告诉我们更多关于你的设置吗?您在使用哪些插件,您的项目有多大,您使用的是哪个操作系统,您使用的是哪种计算机(CPU、RAM 等)......
One thing that will help for sure, is getting more RAM, at least if you only have 1 GB : that's definitly not enough for Eclipse ; in my opinion, 2 GB is the minimum required, if you want to be able to run anything else (browser, mail, whatever, ...) at the same time.
肯定会有所帮助的一件事是获得更多 RAM,至少在您只有 1 GB 的情况下:这对于 Eclipse 绝对不够;在我看来,如果您希望能够同时运行其他任何东西(浏览器、邮件等...),最少需要 2 GB。
Couple of other ideas include :
其他一些想法包括:
- Using sun's JVM ; using the last version is probably a good idea
- Using the latest version of Eclipse, too (For PHP, I've seen great things when switching from PDT 1.x to 2.x, at least)
- Configure your JVM / eclipse.ini properly
- 使用 sun 的 JVM ;使用最新版本可能是个好主意
- 也使用最新版本的 Eclipse (对于 PHP,我至少在从 PDT 1.x 切换到 2.x 时看到了很棒的东西)
- 正确配置您的 JVM / eclipse.ini
回答by Matthias Diester
Based on my experience, the Refresh Workspace issue is not always related to the number of open projects. In fact I think there are a couple of different reasons why Eclipse hangs itself shortly after UI start-up. One thing one can always try on different Eclipse versions (Indigo, Juno, or Kepler) is to delete the platforms index files. Just run a find command against your workspace metadata directory and remove *.index files found.
根据我的经验,刷新工作区问题并不总是与打开的项目数量有关。事实上,我认为 Eclipse 在 UI 启动后不久挂起有几个不同的原因。在不同的 Eclipse 版本(Indigo、Juno 或 Kepler)上始终可以尝试的一件事是删除平台索引文件。只需针对您的工作区元数据目录运行 find 命令并删除找到的 *.index 文件。
回答by Ignacio Pascual
What I did on my case:
我在我的案例中做了什么:
- Rename the project is having issues
- Restart Eclipse
- Close the project (if it's still open)
- Close Eclipse
- Rename to the original name the project
- 重命名项目有问题
- 重启 Eclipse
- 关闭项目(如果它仍然打开)
- 关闭日食
- 将项目重命名为原始名称
Hope it helps!
希望能帮助到你!
回答by Herman
In my experience it's usually a refresh step Eclipse is stuck in. If you click on detailson the refresh (waiting)dialog you'll see the steps it takes. My bet is that it's stuck on some server related refresh, you can skip that step by clicking the big red stop button. That should solve it.
根据我的经验,这通常是 Eclipse 停留在刷新步骤中。如果您单击刷新(等待)对话框上的详细信息,您将看到它需要执行的步骤。我敢打赌,它卡在某些与服务器相关的刷新上,您可以通过单击红色的大停止按钮跳过该步骤。那应该可以解决它。
回答by GMsoF
There is a file called .lock
inside the eclipse workspace folder .metadata
.
.lock
在 eclipse 工作区文件夹中有一个名为的文件.metadata
。
Delete the file .lock
and try to restart your eclipse, it should work now.
删除文件.lock
并尝试重新启动 eclipse,它现在应该可以工作了。