提高 Eclipse 性能的提示
在 Eclipse 中处理大型项目可能会很痛苦,因为 IDE 运行缓慢,有时会停止并且没有响应。我知道这可能取决于操作系统、Eclipse 版本等。
所有 Eclipse 开发人员都有调整 Eclipse 中工作区的技巧,应该关闭什么来提高 IDE 的性能?
例如:我的项目有建议关闭xml验证,不要安装m2eclipse。
由于 Eclipse 的性能,一些开发人员使用 IntelliJ。
更新: 对于那些对 Eclipse 的性能感到不舒服的人,我建议尝试其他解决方案只是为了进行比较 - 我尝试过,这是我在性能主题中所做的最好的:)
Working in Eclipse with big projects can be painful because of IDE works slowly, sometimes stops and doesn't respond. I know it can depends on OS, version of Eclipse etc.
All eclipse developers have tricks which tuning workspace in Eclipse, What should be turn off to improve performance the IDE?
For example: My project has the recommendation to turn off xml validations, don't install m2eclipse.
Because of eclipse's performance some devs use IntelliJ.
UPDATED:
For these who feel uncomfortable with the eclipse's performance I suggest to try other solutions just to have comparison - I tried and this was the best what I've done in performance subject :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
1.禁用eclipse参考中不必要的验证和启动操作。
对于验证:在 Eclipse 菜单 Windows 上 ->首选项->验证,点击“全部禁用”,然后选择您需要的验证器。我只选择了“类路径依赖验证器”。
对于启动操作:在 Eclipse 菜单 Windows ->首选项,输入“启动”,选择“启动和关机”,取消勾选不需要的选项。
2.修改eclipse.ini(设置Xmn(新生代大小)、Xms和Xmx,启用并行GC)
更改或添加下面给出的以下设置
-Xmn128m
-Xms1024m
-Xmx1024m
-Xss2m
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:+UseParallelGC
1.Disable unecessary validations and startup action in eclipse reference.
For validations: on eclipse menu Windows -> Preferences -> Validation, click “Disable All”, and then select the validator which you need. I selected “Classpath Dependency Validator” only.
For startup action: on eclipse menu Windows -> Preferences, type “startup”, select “Startup and Shutdown”, untick the options you don’t need.
2.Modify eclipse.ini(set the Xmn(new generation size), Xms and Xmx, enable parallel GC)
Change or add the following settings given below
-Xmn128m
-Xms1024m
-Xmx1024m
-Xss2m
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:+UseParallelGC
如果您有很多打开的项目,关闭未使用的项目可能会有所帮助。它很有帮助,因为 Eclipse 不必提供内容辅助所需的所有内存模型。
If you have a lot of projects open, it might help to close unused projects. It helps a lot, as Eclipse does not have to provide all the memory model required for content assist.
在“项目”菜单中禁用“自动构建”,并为“构建项目”设置一个键绑定,例如 CTRL + B。我尝试了很多不同的方法来提高 Eclipse 性能,但这是唯一真正适合我的方法。
Disable 'Build Automatically' in the Project menu and set up a key binding for Build Project instead, e.g. CTRL + B. I've tried so many different things to improve Eclipse performance, but this is the only one that really works for me.
性能下降通常是一个或多个插件实施不当造成的问题。识别出不良插件并卸载它通常可以消除不良性能(当然,如果您确实需要该插件,那么您就不走运了;))。
Getting slow performance usually is a problem of one or more badly implemented plugins. Identifying the bad plugin and uninstalling it normally removes the bad performance (of course if you realy NEED the plugin you are out of luck ;) ).
我正在调试一个包含大量断点的大型程序。通过在启动时禁用断点并仅在需要它们之前再次启用它们,我在调试时大大提高了 Eclipse 的性能。
I am debugging a large program containing lots of breakpoints. I have heavily increased Eclipse's performance while debugging by disabling the breakpoints at startup, and only enabling them again just before I need them.
通过进入窗口-->首选项-->常规-->启动和关闭来删除启动时不需要的某些插件的激活。
另请确保您不在任何视图中使用这些插件
Eclipse 不是文字处理器。最好禁用拼写检查。禁用拼写检查将减少 Eclipse 的负担,方法是转到 Windows--> 首选项--> 常规--> 编辑器
-->文本编辑器 --> 拼写
当 eclipse 构建项目时,它将删除所有输出文件夹并重建由其他编译器构建的类。我们可以禁用这些功能,因为删除输出文件夹和重建需要一些时间。转到Windows-->首选项-->Java-->编译器-->构建
禁用对您来说用处不大的标签装饰,也将帮助您获得一些性能。转到Windows-->首选项-->常规-->外观-->标签
装饰
关闭不需要的项目并使用工作集选项从一组中移动
顺利地将项目转移到另一个项目。
如果不需要,您还可以禁用 Eclipse 自动构建。
转到项目 --> 自动构建(取消选中它)
不要在编辑器中打开大量选项卡。最好有 20 个左右的标签。
定期关闭未使用的选项卡。要打开资源,我们始终可以使用 ctrl+shift+R 和
ctrl+shift+T(java 资源)而不是打开大量选项卡
禁用不需要的插件。完整的 J2EE eclipse 版本有一个禁用/卸载插件的选项。转到帮助-->软件更新-->管理配置。右键单击任何已安装的插件即可获取禁用选项。如果此选项不可用,则通过转至 Windows--> 首选项--> 功能来启用经典更新并检查经典更新。现在,管理配置选项应该在帮助菜单中可用
Remove unwanted activation of some of the plugins at start-up by going to windows-->preference-->General-->Startup and shutdown.
Also make sure you don't use those plugins in any of your views
Eclipse is not a word processor. Better to disable the spell check. Disabling spell check will reduce the eclipse burden by going to Windows-->Preference-->General-->Editors
--> Text Editors-->Spelling
When eclipse builds the project, it will delete all output folders and rebuild classes built by other compilers. We can disable such features, as deleting the output folders and rebuilding will take sometime. Goto Windows-->Preference-->Java-->Compiler-->Building
Disabling label decorations which is of less use for you, will also help you to gain some performance . Goto Windows-->Preference-->General-->Appearance-->Label
Decorations
Close unwanted projects and use working set option to move from one group of
project to another smoothly.
You could also disable Eclipse automatic building, if it is not needed for you.
Goto Project-->Build Automatically (uncheck it)
Do not keep lot of tabs opened in the editor. Better to have around 20 tabs .
Regularly close the unused tabs. To open resource we can always use ctrl+shift+R and
ctrl+shift+T (java resource) instead of opening lot of tabs
Disable unwanted plugins. Full J2EE eclipse version has an option to disable/uninstall plugins. Goto Help-->Software Updates-->Manage Configuration. Right click on any installed plugin to get disable option. If this option is not available then enable Classic Update by going to Windows-->Preference-->Capabilty and check classic update. Now the manage configuration option should be available in help menu
我是一个 intelliJ 用户,虽然偶尔会看看 eclipse,因为我喜欢使用它。我的同事指出,您可以尝试的几件事是
显示堆状态(常规 -> 显示堆状态)可以密切关注内存并按下按钮进行清除!
在项目属性中将默认输出文件夹设置为目标之外
我猜你一定已经尝试过给它更多的内存。希望它会有所改善。
I'm an intelliJ user though occasionally peep into eclipse since I like to use it. Couple of things you can try which my work colleague pointed to are
Show the heap status (General -> Show heap status) can keep an eye on memory and hit the button to clear!
In project properties set the default output folder to be outside of the target
You must have already tried giving it more memory I guess. Hopefully it will improve.
将所有验证器(首选项 > 验证)设置为“手动”并取消选择“构建”。
另外,考虑使用外部 svn 客户端(如 Tortoise)而不是像 subclipse 这样的 eclipse 插件:
Put all validators (preferences > Validation) to 'Manual' and deselect 'Build'.
Also, consider using an external svn client (like Tortoise) instead of an eclipse plugin like subclipse:
将源目录树和输出目录树添加到病毒扫描程序的排除列表中。
Add the source and output directory trees to your Virus Scanner's exclusion list.