Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to improve IntelliJ code editor speed?

I am using IntelliJ (Community Edition) for several months, and at first I'm pleased about its speed & simplicity. But now, after upgrading to version 10, it's extremely slow. Sometimes I click a file then it takes 5 - 15 seconds to open that file (it freeze for that time).

I don't know if I have done anything which cause that: I have installed 2 plugins(regex, sql), and have 2 versions of IntelliJ on my machine (now the version 9 removed, only version 10 remains).

Is there any tips to improve speed of code editor, in general, or specifically IntelliJ? I have some experience when using IntelliJ:

  1. Should open IntelliJ a while before working, cause it needs time for indexing.

  2. Don't open too many code tabs

  3. Open as less other program as possible. I'm using 2 GB RAM WinXP, and it just seems fairly enough for Java, IntelliJ & Chrome at the same time.

like image 494
Hoàng Long Avatar asked Jan 13 '11 03:01

Hoàng Long


People also ask

How much RAM should IntelliJ use?

IntelliJ IDEA memory usage Follow IntelliJ itself reports that it is using a little more than 1GB of heap but the OS reports that it is using anywhere from 3.5 to 4.5 GB.

How do I make IntelliJ consume less memory?

From the main menu, select Help | Change Memory Settings. Set the necessary amount of memory that you want to allocate and click Save and Restart.

Is IntelliJ IDEA faster than Eclipse?

The more plugins installed in the IDE make it more heavy for your computer. However, Eclipse handles the large projects faster as compared to IntelliJ Idea because it indexes the entire project on start-up. But, when you are working on an existing project, IntelliJ Idea works faster and smoother as compared to Eclipse.


1 Answers

Try to increase using memory size at %IDEA_HOME%\bin\idea.exe.vmoptions

-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
  • Xms128m means that at startup there will be allocated 128 mb for heap.
  • Xmx512m means that maximum heap size available for IDEA is 512 mb
  • -XX:MaxPermSize=250m PermGen related to java heap.

Also you can set maximum garbage collector pause

-XX:MaxGCPauseMillis=10

That means that java's GC will take max 10ms to do his work.

And use concurrent Mark-Sweep (CMS) Collector (But i'm not sure that this will help for latest version of IDEA)

-XX:+UseConcMarkSweepGC 
like image 74
Igor Konoplyanko Avatar answered Oct 25 '22 18:10

Igor Konoplyanko