I'm using intelliJ for Scala development and got 8 GB of new RAM last week, so I thought: time to use it. I checked my task manager and found intelliJ using ~250mb. From eclipse I knew that tweaking JVM options helped a lot in improving speed, so I googled ...
and found this one for OS X I couldn't find the JVM option immediately, so I started tweaking Xmx. At 1 GB, I realized it doesn't start any more. I checked the intelliJ java version, found it's outdated and 32bit.
So in order to use your current JDK and 64 bit you have to change your link to from:
IntelliJ IDEA Community Edition 10.0.2\bin\idea.exe
to
IntelliJ IDEA Community Edition 10.0.2\bin\idea.BAT
and adjust "Start in"
The bat looks for JDK_HOME
and uses 64bit now.
My current VM Options, which are located in
...\IntelliJ IDEA Community Edition 10.0.2\bin\idea.exe.vmoptions
are
-Xms512m -Xmx1024m -XX:MaxPermSize=512m -ea -server -XX:+DoEscapeAnalysis -XX:+UseCompressedOops -XX:+UnlockExperimentalVMOptions -XX:+UseParallelGC
Instead of -XX:+UseParallelGC
, you can use -XX:+UseConcMarkSweepGC
, which is
the accepted choice for desktop apps, but I have changed to the throughput collector recently. because with a fast machine and a small enough heap, you have quick pauses, more throughput and no issues with fragmentation (ijuma. #scala)
Changes:
-XX:+UseConcMarkSweepGC //removed // removed, because not needed with the lastest JVM. -XX:+UnlockExperimentalVMOptions -XX:+DoEscapeAnalysis -XX:+UseCompressedOops
I'll stick to these options for now. I would really like to know your experience with it.
Which options work best for you? How do I hide this cmd window while running intelliJ through the .bat
? :)
By the way, here's another link for tuning intelliJ. Basically it says on p.20/21 to turn off windows restore and antivirus for system dirs.
Another way to speed up intelliJ is to put intellij system folder on ramdrive (thanks OlegYch|h).
from idea.properties idea.system.path=${idea.home}/.IntelliJIdea/system
See Superuser for Win 7 64bit RAM Drive or this one. 1 GB seems fine for me.
Another hint a friend gave me is to exclude the project directories from your antivirus (scan on access)
There are similar posts regarding tuning Eclipse:
IntelliJ requires quite a lot of memory. If you don't give it enough memory it will become slow.
Intellij Idea consumes all 8GB memory allocated for it after upgrading to 2021.1. Intellij Idea consumes all 8GB memory allocated for it after upgrading to 2021.1.
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.
This combination works great on my Intellij13 running in Mavericks:
Updated Jul 18, 2017:
# custom IntelliJ IDEA VM options -ea -server -Xms2G -Xmx4096M -Xss2m -XX:MaxMetaspaceSize=2G -XX:ReservedCodeCacheSize=1G -XX:MetaspaceSize=512m -XX:+UseConcMarkSweepGC -XX:+DoEscapeAnalysis -XX:SoftRefLRUPolicyMSPerMB=50 -XX:+UnlockExperimentalVMOptions -Djava.net.preferIPv4Stack=true -Dsun.io.useCanonCaches=false -XX:LargePageSizeInBytes=256m -XX:+UseCodeCacheFlushing -XX:ParallelGCThreads=8 -XX:+DisableExplicitGC -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintFlagsFinal -XX:+AggressiveOpts -XX:+CMSClassUnloadingEnabled -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseAdaptiveGCBoundary -XX:+UseSplitVerifier -XX:CompileThreshold=10000 -XX:+OptimizeStringConcat -XX:+UseStringCache -XX:+UseFastAccessorMethods -XX:+UnlockDiagnosticVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCompressedOops -XX:-OmitStackTraceInFastThrow -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine
I keep this setting updated at https://github.com/adben/config/blob/master/idea64.vmoptions
For me switching to SSD-drive improved performance a lot (especially for large projects).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With