Home > Enterprise >  IntelliJ Idea Community Edition using excessive memory
IntelliJ Idea Community Edition using excessive memory

Time:09-30

I am new to using IntelliJ IDEA, and I am constantly getting warnings that I need to increase my max memory heap size, which is currently set to 2048M. I developing Java applications built with Maven on a Windows desktop with 8GB of RAM. The task manager indicates that the IDE is using over 3GB of memory.

I have searched the JetBrains site for help with this and have found recommendations to remove/disable certain plugins. I did that as much as I could, and currently only have two non-standard plugins installed, one for AWS and one for Tomcat.

Even my smallest Java application exhibits this problem. I am wondering if others have faced this issue and how you have overcome it.

Thank you in advance for any suggestions; I appreciate the help!

Edit:

As I noted in my comment, it seems the memory issue stems from the project selection panel. If I have a project open and then close IntelliJ (without selecting "file/close" first), then reopen IntelliJ, the project opens up with reasonable (~800M) memory usage. Opening a project through the project selection panel results in a memory usage of > 2,700M!

CodePudding user response:

1. Clear the system cache From the main menu, select File | Invalidate Caches.

2. In the Invalidate Caches dialog, you can select additional actions that the IDE will perform while removing the cache files:

Clear file system cache and Local History: remove the virtual file system cache together with the information stored in Local History.

This action might be helpful for troubleshooting purposes when the usual cache invalidation is not enough to solve the problem.

Clear VCS Log caches and indexes: remove the cache and indexes of the VCS Log.

Enable this option if you are certain that your VCS Log indexes are broken, for example, if the Log search doesn't work correctly.

Clear downloaded shared indexes: remove the downloaded shared index files.

Ask before downloading new shared indexes: show a notification prompting you to download new shared indexes as they become available.

Enabling this option also updates your settings for shared project indexes in Settings/ Preferences | Tools | Shared Indexes.

3.Click Invalidate and Restart. You can follow this image

If you click Just restart, cache files won't be deleted, and the selected optional actions won't be applied.

We recommend that you restart the IDE via Find Action: press Ctrl Shift A and type Restart IDE

CodePudding user response:

Solved!

I was finally able to figure out the source of the major memory leak: It is the Eclipse Interoperability plugin. I cycled through enabling/disabling the plugin, restarting in between attempts, and am certain that this is the problem. Fortunately I don't need this plugin.

I can see from the JetBrains help site that there can be other sources of excessive memory use in IntelliJ, but this one resolved the problem for me.

  • Related