Windows 7 64 位上 eclipse 4.2 (STS 3.1) 的最佳内存设置?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13701428/
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
Best memory settings for eclipse 4.2 (STS 3.1) on Windows 7 64 bit?
提问by jorrebor
I apoligize in advance if this question is indeed too subjective as SO warns me.
如果这个问题确实像 SO 警告我的那样过于主观,我会提前道歉。
My workstation has 8 gb of ram and runs windows 7 64 bit. I use the Spring tool Suite (3.1) but as soon as i am starting to open and modify the spring config (.xml) files, STS becomes incredibly slow.
我的工作站有 8 GB 内存并运行 Windows 7 64 位。我使用 Spring 工具套件 (3.1),但是一旦我开始打开和修改 spring 配置 (.xml) 文件,STS 就会变得非常慢。
I already tried switching off "build automatically" and to increase memory settings but no luck.
我已经尝试关闭“自动构建”并增加内存设置但没有运气。
How should i change my .ini ? this is what i have set now:
我应该如何更改我的 .ini ?这是我现在设置的:
-vm
C:/Program Files/Java/jdk1.7.0_07/bin/javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
4096M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx2048m
-XX:MaxPermSize=512m
My collageu running the same project in IntelliJ, has no problems.
我的同事在 IntelliJ 中运行相同的项目,没有问题。
Thank you!
谢谢!
采纳答案by hyness
A 2gb heap is plenty for eclipse, I use it myself. My suspicion is the culprit is Eclipse 4.2 Juno. It has very well documented performance issues. There is a hidden 3.8 Juno version on the eclipse download site. It has all the same features that 4.2 Juno has but uses the old UI components which are more stable and performant.
一个 2GB 的堆对于 eclipse 来说已经足够了,我自己使用它。我怀疑罪魁祸首是 Eclipse 4.2 Juno。它有很好的记录性能问题。eclipse 下载站点上有一个隐藏的 3.8 Juno 版本。它具有与 4.2 Juno 相同的所有功能,但使用更稳定和性能更好的旧 UI 组件。
回答by Sireesh Yarlagadda
After doing lot of research , this arguments solves my problem
-nosplash
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.6.0_45\jre\bin\server\jvm.dll
#/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java #OS X
-vmargs
-Xincgc
-Xss1m
-Duser.name=FirstName LastName
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.6
-Declipse.p2.unsignedPolicy=allow
-Declipse.p2.MD5Check=false
-Xms128m
-Xmx1024m
-XX:NewSize=16m
-XX:PermSize=128m
-XX:MaxPermSize=400m
-XX:MaxPermHeapExpansion=20m
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=70
-XX:+UseCMSInitiatingOccupancyOnly
-XX:+UseParNewGC
-XX:+CMSConcurrentMTEnabled
-XX:ConcGCThreads=2
-XX:ParallelGCThreads=2
-XX:+CMSIncrementalPacing
-XX:CMSIncrementalDutyCycleMin=0
-XX:CMSIncrementalDutyCycle=5
-XX:GCTimeRatio=49
-XX:MaxGCPauseMillis=20
-XX:GCPauseIntervalMillis=1000
-XX:+UseCMSCompactAtFullCollection
-XX:+CMSClassUnloadingEnabled
-XX:+DoEscapeAnalysis
-XX:+UseCompressedOops
-XX:+AggressiveOpts #Doesnt work with Android see Google Code Android issue 9883
-XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses
-Xverify:none
回答by Tobi Akerele
http://www.youtube.com/watch?v=-JC7B1a_7dQThis is a good guide on optimal performance for eclipse and android
http://www.youtube.com/watch?v=-JC7B1a_7dQ这是关于 eclipse 和 android 最佳性能的很好指南