Eclipse 3.4(Ganymede)的内存使用量是否明显高于3.2?

时间:2022-09-03 00:01:14

I was happily using Eclipse 3.2 (or as happy as one can be using Eclipse) when for a forgotten reason I decided to upgrade to 3.4. I'm primarily using PyDev, Aptana, and Subclipse, very little Java development.

我很高兴使用Eclipse 3.2(或者就像使用Eclipse一样开心),出于遗忘的原因,我决定升级到3.4。我主要使用PyDev,Aptana和Subclipse,只有很少的Java开发。

I've noticed 3.4 tends to really give my laptop a hernia compared to 3.2 (vista, core2duo, 2G). Is memory usage on 3.4 actually higher than on 3.2, and if so is there a way to reduce it?

我注意到3.4相比3.2(vista,core2duo,2G)更倾向于让我的笔记本电脑疝气。 3.4上的内存使用率是否高于3.2,如果有,是否有办法减少它?

EDIT: I tried disabling plugins (I didn't have much enabled anyway) and used the jvm monitor; the latter was interesting but I couldn't figure out how to use the info in any practical way. I'm still not able to reduce its memory footprint. I've also noticed every once in a while Eclipse just hangs for ~30 seconds, then magically comes back.

编辑:我尝试禁用插件(我没有太多启用)并使用jvm监视器;后者很有趣,但我无法弄清楚如何以任何实际的方式使用这些信息。我仍然无法减少其内存占用。我也注意到Eclipse每隔一段时间就会挂起约30秒,然后神奇地回来了。

4 个解决方案

#1


3  

Yes memory usage can get real high and you might run into problems with your JVM, as the default setting is a bit to low. Consider using this startup parameters when running eclipse:

是的内存使用率可能会变得非常高,您可能会遇到JVM问题,因为默认设置有点偏低。在运行eclipse时考虑使用此启动参数:

-vmargs -XX:MaxPermSize=1024M -Xms256M -Xmx1024M

#2


3  

With those options, I manage to limit the memory used to 700Mo (which is quite high, but still workable with my 2 Go)

有了这些选项,我设法将使用的内存限制为700Mo(这是非常高的,但仍然适用于我的2 Go)

-vmargs
-Xms128m
-Xmx384m
-Xssv2m
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:CompileThreshold=5
-XX:+UseParallelGC
-Dcom.sun.management.jmxremote

And consider also to launch

并考虑也推出

C:\[jdk1.6.0_0x path]\bin\jconsole.exe

And choose 'Connection / New connection / 'eclipse' to monitor the memory used by eclipse
(which is why I use '-Dcom.sun.management.jmxremote')

并选择'Connection / New connection /'eclipse'来监视eclipse使用的内存(这就是为什么我使用'-Dcom.sun.management.jmxremote')

Other options are available here.

其他选项可在此处获得。

#3


2  

The more plugins you have, the more memory Eclipse will consume. 3.4 includes more plugins by default than 3.3, and so on, and so on, as more and more developers clamor for features to be included.

您拥有的插件越多,Eclipse将消耗的内存就越多。 3.4包含更多插件,默认情况下比3.3,等等,因为越来越多的开发人员要求包含功能。

Go to Window->Show View, and start typing "plug in", and one of the options will be the Plug In Registry. Open that view, and click on the arrow to show active plugins only. These are the plugins actually loaded into memory. My Eclipse 3.3 currently has 89 out of 445 or so plugins loaded. You can then selectively start disabling plugins from the Help menu, once you see which ones you won't use (right now, for instance, I"m not using Mylyn, but I hope to in the future).

转到Window-> Show View,然后输入“plug in”,其中一个选项将是Plug In Registry。打开该视图,然后单击箭头以仅显示活动插件。这些是实际加载到内存中的插件。我的Eclipse 3.3目前在445个左右的插件中加载了89个。然后,您可以选择从“帮助”菜单中开始禁用插件,一旦您看到哪些插件不会使用(例如,现在,我“不使用Mylyn,但我希望将来能够使用”)。

#4


2  

To add to my previous answer and to your recent update:

要添加到我之前的答案和您最近的更新:

Eclipse just hangs for ~30 seconds, then magically comes back.

Eclipse只挂了约30秒,然后神奇地回来了。

That is usually a sign for a failed network access with a timeout (and the associated 'freeze' while the application is waiting for said timeout).

这通常是超时失败的网络访问(以及应用程序等待超时时关联的'冻结')的标志。

try typing 'net use' in a DOS prompt, and check if you have net path declared there, some of them you could get rid off ('net use /D aUselessPath'). To be sure, check also the shares that you declare (net share).

尝试在DOS提示符下输入'net use',并检查你是否有在那里声明的净路径,其中一些你可以摆脱('net use / D aUselessPath')。当然,还要检查您声明的份额(净份额)。


Since you are with Vista, try also to deactivate superfetch and see if you still experience those freezes (both for eclipse and Firefox).
Open a CMD prompt with administrative privileges and enter "net stop superfetch" to stop the SuperFetch service.
It is not a good long-term solution though, just a quick check to make. Superfetch should be kept on, and will actually restart on your next reboot, since the service is set to start automatically at each Windows session.
Again, this is just to see if there is any connection between that service and your freezes.

既然您使用的是Vista,请尝试停用superfetch,看看您是否仍然遇到过这些冻结(包括eclipse和Firefox)。使用管理权限打开CMD提示符并输入“net stop superfetch”以停止SuperFetch服务。这不是一个好的长期解决方案,只需快速检查即可。应该保持Superfetch,并且在下次重新启动时实际重启,因为该服务设置为在每个Windows会话时自动启动。同样,这只是为了查看该服务与您的冻结之间是否存在任何连接。

#1


3  

Yes memory usage can get real high and you might run into problems with your JVM, as the default setting is a bit to low. Consider using this startup parameters when running eclipse:

是的内存使用率可能会变得非常高,您可能会遇到JVM问题,因为默认设置有点偏低。在运行eclipse时考虑使用此启动参数:

-vmargs -XX:MaxPermSize=1024M -Xms256M -Xmx1024M

#2


3  

With those options, I manage to limit the memory used to 700Mo (which is quite high, but still workable with my 2 Go)

有了这些选项,我设法将使用的内存限制为700Mo(这是非常高的,但仍然适用于我的2 Go)

-vmargs
-Xms128m
-Xmx384m
-Xssv2m
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:CompileThreshold=5
-XX:+UseParallelGC
-Dcom.sun.management.jmxremote

And consider also to launch

并考虑也推出

C:\[jdk1.6.0_0x path]\bin\jconsole.exe

And choose 'Connection / New connection / 'eclipse' to monitor the memory used by eclipse
(which is why I use '-Dcom.sun.management.jmxremote')

并选择'Connection / New connection /'eclipse'来监视eclipse使用的内存(这就是为什么我使用'-Dcom.sun.management.jmxremote')

Other options are available here.

其他选项可在此处获得。

#3


2  

The more plugins you have, the more memory Eclipse will consume. 3.4 includes more plugins by default than 3.3, and so on, and so on, as more and more developers clamor for features to be included.

您拥有的插件越多,Eclipse将消耗的内存就越多。 3.4包含更多插件,默认情况下比3.3,等等,因为越来越多的开发人员要求包含功能。

Go to Window->Show View, and start typing "plug in", and one of the options will be the Plug In Registry. Open that view, and click on the arrow to show active plugins only. These are the plugins actually loaded into memory. My Eclipse 3.3 currently has 89 out of 445 or so plugins loaded. You can then selectively start disabling plugins from the Help menu, once you see which ones you won't use (right now, for instance, I"m not using Mylyn, but I hope to in the future).

转到Window-> Show View,然后输入“plug in”,其中一个选项将是Plug In Registry。打开该视图,然后单击箭头以仅显示活动插件。这些是实际加载到内存中的插件。我的Eclipse 3.3目前在445个左右的插件中加载了89个。然后,您可以选择从“帮助”菜单中开始禁用插件,一旦您看到哪些插件不会使用(例如,现在,我“不使用Mylyn,但我希望将来能够使用”)。

#4


2  

To add to my previous answer and to your recent update:

要添加到我之前的答案和您最近的更新:

Eclipse just hangs for ~30 seconds, then magically comes back.

Eclipse只挂了约30秒,然后神奇地回来了。

That is usually a sign for a failed network access with a timeout (and the associated 'freeze' while the application is waiting for said timeout).

这通常是超时失败的网络访问(以及应用程序等待超时时关联的'冻结')的标志。

try typing 'net use' in a DOS prompt, and check if you have net path declared there, some of them you could get rid off ('net use /D aUselessPath'). To be sure, check also the shares that you declare (net share).

尝试在DOS提示符下输入'net use',并检查你是否有在那里声明的净路径,其中一些你可以摆脱('net use / D aUselessPath')。当然,还要检查您声明的份额(净份额)。


Since you are with Vista, try also to deactivate superfetch and see if you still experience those freezes (both for eclipse and Firefox).
Open a CMD prompt with administrative privileges and enter "net stop superfetch" to stop the SuperFetch service.
It is not a good long-term solution though, just a quick check to make. Superfetch should be kept on, and will actually restart on your next reboot, since the service is set to start automatically at each Windows session.
Again, this is just to see if there is any connection between that service and your freezes.

既然您使用的是Vista,请尝试停用superfetch,看看您是否仍然遇到过这些冻结(包括eclipse和Firefox)。使用管理权限打开CMD提示符并输入“net stop superfetch”以停止SuperFetch服务。这不是一个好的长期解决方案,只需快速检查即可。应该保持Superfetch,并且在下次重新启动时实际重启,因为该服务设置为在每个Windows会话时自动启动。同样,这只是为了查看该服务与您的冻结之间是否存在任何连接。