How can I reduce Eclipse Ganymede's memory use?

后端 未结 13 978
野性不改
野性不改 2020-12-02 05:33

I use the recent Ganymede release of Eclipse, specifically the distro for Java EE and web developers. I have installed a few additional plugins (e.g. Subclipse, Spring, Find

相关标签:
13条回答
  • 2020-12-02 06:15

    Eclipse generally keeps a lot of meta-data in memory to allow for all kinds of IDE gymnastics.

    I have found that the default configuration of Eclipse works well for most purposes and that includes a limit (either given explicitly or implictly by the JVM) to how much memory can be consumed, and Eclipse will stay within that.

    Is there any particular reason you are concerned about memory usage?

    0 讨论(0)
  • 2020-12-02 06:16

    I don't think the JVM does a lot of garbage collection unless it has to (i.e. it's getting to its limits). Therefore it grabs all the memory it can get, probably up to the limit set in the eclipse.ini (the -Xmx argument, set to 512MiB here).

    You can get a visual representation of the current heap status by checking 'Preferences' -> 'General' -> 'Show heap status'. It will create a small gauge in the status bar which also has a 'trash can' button you can use to trigger a manual garbage collection.

    0 讨论(0)
  • 2020-12-02 06:16

    The Ganymede Java EE plugins are absolutely huge when running in memory. Also, I've had bad experiences with FindBugs and its reliability over a long coding session.

    If you can't live without these plugins though, then your only recourse is to start closing projects. If you limit the number of open projects in your workspace, the compiler (and FindBugs) will have less to worry about and your memory usage will drop tremendously.

    I usually split up my workspaces by customer and then only keep the bare-minimum projects open within each workspace. Note that if you have a particularly large projects (especially ones with a lot of files checked by WST), that will not only chew through your memory, but also cause a noticeable pause in responsiveness when compiling.

    0 讨论(0)
  • 2020-12-02 06:20

    I had problem with java-based programs memory consumption. I found that it could be related to the chosen jvm (in my case it was). Try to run eclipse with -client switch.

    In some operating systems (most of linux distros I believe), the default option is server vm, which will consume noticeable more memory when running applications with gui.

    In my case initial memory footprint went down from 300MB to 80MB.

    Sorry for my crappy English. I hope I helped.

    All Regards Arkadiusz Jamrocha

    0 讨论(0)
  • 2020-12-02 06:20

    I usually give Eclipse 512 MB of RAM (using the -Xmx option of the JVM) and I don't have any memory problems with Ganymede. I upgraded to two GB of RAM a few months ago, and I can really recommend it. It makes a huge difference.

    0 讨论(0)
  • 2020-12-02 06:26

    RAM is relatively cheap (not that this is an excuse for poor memory managmentment). Unused memory is essentially WASTED memory. If you're hitting limits and the IDE is the problem consider less multitasking, adjusting your memory reqs, or buy more. I wouldn't cripple Eclipse if that's your bread-and-butter IDE.

    0 讨论(0)
提交回复
热议问题