1

I'm using the Statistic plugin for IntelliJ IDEA. For one project of mine which has around 15.000 Java source code lines, Statistic gets stuck at 92% progress and then IntelliJ displays the following Out of Memory dialog:

I tried increasing the memory but that causes IntelliJ to refuse starting up so I had to set the default 512MB again.

Why is this caused and how can it be fixed so I can calculate statistics about my project again? Note that the error does not appear with "smaller" projects. In TaskManager, IntelliJ is at about 980MB of RAM usage but my machine has about 7GB RAM left in total.

Community
  • 1
  • 1
BullyWiiPlaza
  • 17,329
  • 10
  • 113
  • 185

2 Answers2

1

TL, DR: Exclude large files in the Statistic plugin settings.

The reason I had this problem was because of many multi-GB datafiles in the project directory. By excluding these large files, the problem was solved.

In the settings of the Statistic plugin, you can exclude some file types and/or exclude certain (sub-) directories, to prevent the plugin from trying to read them. If the files are not read, their content is not loaded into memory, preventing the Out of Memory error.

The setting of the Statistic plugin are found in its tab (in the bottom left), just beneath the Refresh-button. Alternatively, open them at Pycharm->Preferences->Tools->Statistic.

Metlam
  • 21
  • 2
0

You can manually edit the idea.exe.vmoptions or idea64.exe.vmoptions file in your installation directory, and modify the following line to increase the max heap size used by IntelliJ:

# Increase max heap size to 2GB.
-Xmx2g
ck1
  • 5,243
  • 1
  • 21
  • 25
  • This causes `IntelliJ` to no longer start like described in the question also. My machine has enough `RAM` left though and I can't tell whether `IntelliJ` has a distinction between 32 and 64-bit versions. Apparently, there is just one version so I'm surprised about the startup crash with more memory assigned – BullyWiiPlaza Nov 20 '16 at 19:18