IntelliJ IDEA 13 CE consuming lots of CPU

后端 未结 5 824
南笙
南笙 2021-02-05 00:23

I upgraded from IntelliJ IDEA from 12 CE to 13 CE few days ago and it has been hogging up CPU. Every few minutes it\'ll peak to 450-500% and then come down to 100-200%. Also, I\

相关标签:
5条回答
  • 2021-02-05 00:36

    Go to your home folder, then navigate to .IntelliJIdea13\config\options

    Edit the file project.default.xml by changing the VM_PARAMETERS Xmx and Xms as follows:

    <option name="VM_PARAMETERS" value="-Xmx2048m -Xms512m -XX:MaxPermSize=250m -ea" />

    It decreased the CPU usage to 50%.

    0 讨论(0)
  • 2021-02-05 00:38

    If anyone's wondering the "right" way to edit the idea.vmoptions or idea64.vmoptions file, here it is: https://www.jetbrains.com/idea/help/tuning-intellij-idea.html

    On *NIX, you want to copy

    <IntelliJ IDEA installation folder>/bin/idea64.vmoptions
    

    to:

    $HOME/.IntelliJIdeaXX/idea64.vmoptions
    

    and edit that file to increase the heap memory for IntelliJ IDEA

    (OP's example settings: Xms = 512m and Xmx = 2048)

    0 讨论(0)
  • 2021-02-05 00:41

    I'm posting this comment by K P as an answer, because K P does not have enough reputation.

    It just needed some more memory to prevent repeated garbage collection. I found the file idea.vmoptions [aka idea64.exe.vmoptions] and increased the memory for InteiiJ to run (Xms = 512m and Xmx = 2048). The CPU usage has come down to 0.2 - 10% when nothing is being done on it.

    0 讨论(0)
  • 2021-02-05 00:45

    As other said,increasing memory heap of IDEA is work, my IDEA version is 2016.3.4, following is setting way

    1. Do one of the following:
      • Use the main menu command Help | Edit Custom VM Options to create a copy of the idea.vmoptions file in the user home. Refer to Edit Custom VM Options for details.
      • Copy the existing file from the IntelliJ IDEA installation folder somewhere and save the path to this location in the environment variable IDEA_VM_OPTIONS.
      • Copy the existing file /bin/idea.exe.vmoptions or /bin/idea64.exe.vmoptions from the IntelliJ IDEA installation folder into the location under your user home.
    0 讨论(0)
  • 2021-02-05 00:50

    Try clean up cache and restart. In Intellij 14 go to menu File -> Invalidate Caches / Restart...

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