eclipse 为什么 SpringSource Tool Suite (STS) 这么慢?我该如何解决?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2727040/
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-10 19:21:37  来源:igfitidea点击:

Why is SpringSource Tool Suite (STS) so slow? And how can I fix it?

eclipsests-springsourcetoolsuitespring-ide

提问by curthipster

I've been running STS 2.3.2 on a MacBook Pro for a few days now. I'm finding the performance to be significantly slower than any other build of Eclipse I've used. For example, switching from one tab to another can take up to 4 seconds.

我已经在 MacBook Pro 上运行 STS 2.3.2 几天了。我发现性能比我使用过的任何其他 Eclipse 版本都要慢。例如,从一个选项卡切换到另一个选项卡最多可能需要 4 秒。

I tried turning off much of the validation, and increasing the memory, but it's not making a difference.

我尝试关闭大部分验证并增加内存,但没有任何区别。

Are others having similar experiences?

其他人有类似经历吗?

回答by Michael Collins

I had the same problem on a MacBook Pro i7. Switching editors or views was painfully slow. Solved it by turning off Spring validators that I didn't need. Go to:

我在 MacBook Pro i7 上遇到了同样的问题。切换编辑器或视图非常缓慢。通过关闭我不需要的 Spring 验证器来解决它。去:

SpringSource Tool Suite -> Preferences -> Spring -> Project Validators

SpringSource Tool Suite -> Preferences -> Spring -> Project Validators

Specifically, I deselected all validators except for Spring Validator, Beans Validator and STS Bean Validator.

具体来说,我取消了除 Spring Validator、Beans Validator 和 STS Bean Validator 之外的所有验证器。

回答by Tomato

I would also suggest turning off automatic build feature. Uncheck Project -> Build Automatically. Combined with Michael's suggestions it made difference for me.

我还建议关闭自动构建功能。取消选中项目-> 自动构建。结合迈克尔的建议,它对我产生了影响。

Edit: automatic content assist feature was also slowing me down, so I turned it off. I just use it only when I need it by pressing CTRL + Space. See herefor details.

编辑:自动内容辅助功能也减慢了我的速度,所以我将其关闭。我只在需要时按 CTRL + Space 使用它。有关详细信息,请参见此处

回答by Gruber

Disable the startup window (called Dashboard) which downloads RSS feeds from the Spring team upon program launch: http://tux2323.blogspot.se/2010/08/eclipse-tipp-reloaded-disable-sts.html. Should you want see it you can use Help->Dashboard.

禁用启动窗口(称为仪表板),该窗口在程序启动时从 Spring 团队下载 RSS 提要:http: //tux2323.blogspot.se/2010/08/eclipse-tipp-reloaded-disable-sts.html。如果你想看到它,你可以使用帮助->仪表板。

回答by Venkat

Couple of more ways to reduce the memory foot print on Eclipse/STS

减少 Eclipse/STS 上的内存占用的更多方法

  1. you can right click on project and choose to close unrelated projects

  2. you can try creating working sets with related projects and select only the one you are working on, you can do this from Top Right corner(View Menu) on the Project explorer tab

  3. Youcan monitor Heapsize, from Preferences General you can check the "Show Heap Status" to show the currently used heapspace , this will show a "recycle bin" icon beside the heap value, you can click this to force Garbage collection

  1. 您可以右键单击项目并选择关闭不相关的项目

  2. 您可以尝试使用相关项目创建工作集并仅选择您正在处理的工作集,您可以从项目资源管理器选项卡的右上角(查看菜单)执行此操作

  3. 你可以监控Heapsize,从Preferences General你可以勾选“Show Heap Status”来显示当前使用的heapspace ,这会在heap value旁边显示一个“recycle bin”图标,你可以点击这个强制垃圾收集

回答by alain.janinm

I had a problem with a Maven update process running for a while, every time I launch STS.

每次启动 STS 时,我都会遇到运行一段时间的 Maven 更新过程的问题。

Maven tried to connect to http://dist.springsource.com/release/TOOLS/update/e<your_eclipse_version>

Maven 尝试连接到 http://dist.springsource.com/release/TOOLS/update/e<your_eclipse_version>

As per the Jira of STS, I changed it to

根据STS 的 Jira,我将其更改为

http://download.springsource.com/release/TOOLS/update/e<your_eclipse_version>

http://download.springsource.com/release/TOOLS/update/e<your_eclipse_version>

in Window-> Preferences-> Install/Update-> Available software

Window-> Preferences-> Install/Update->Available software

And now the process is immediate.

现在这个过程是即时的。

回答by Sudhirkumar Murkute

Try this:

尝试这个:

C:\sts-3.6.0.RELEASE\sts.exe -clean