Acceleration IntelliJ-Idea

I use intelliJ to develop Scala and last week I got 8 GB of new RAM, so I thought: it's time to use it. I checked my task manager and found intelliJ using ~ 250 MB. From the eclipse, I knew that setting the JVM parameters helped a lot to improve speed, so I googled ...

and found this one for OS X, I could not immediately find the JVM option, so I started to configure Xmx. At 1 GB, I realized that it no longer starts. I checked the IntelliJ Java version, found it outdated and 32-bit.

Thus, in order to use your current JDK and 64-bit, you must change the link to from:

IntelliJ IDEA Community Edition 10.0.2\bin\idea.exe 

at

 IntelliJ IDEA Community Edition 10.0.2\bin\idea.BAT 

and set up start in

The bat searches for JDK_HOME and uses the 64-bit JDK_HOME .

My current virtual machine settings that are 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

An acceptable choice for desktop applications, but I recently switched to a bandwidth collector. because with a fast machine and a pretty small bunch you have fast pauses, high throughput and no fragmentation problems (ijuma. #scala)

Changes:

 -XX:+UseConcMarkSweepGC //removed // removed, because not needed with the lastest JVM. -XX:+UnlockExperimentalVMOptions -XX:+DoEscapeAnalysis -XX:+UseCompressedOops 

I will stick with these options now. I would really like to know your experience with him.

Which options work best for you? How to hide this cmd window when running intelliJ via .bat ? :)

By the way, here is another link for tuning intelliJ . Basically, on page 20/21 it is said to disable windows recovery and antivirus for system directories.

Another way to speed up intelliJ is to put the intellij system folder in ramdrive (thanks OlegYch | h).

 from idea.properties idea.system.path=${idea.home}/.IntelliJIdea/system 

See Superuser for Win 7 64-bit RAM Drive or this . 1 GB seems to be good for me.

Another tip my friend gave me is to exclude project directories from your antivirus (access check)

There are similar posts regarding tuning Eclipse:

  • Eclipse Helios 3.6
  • Eclipse of Juno 4.2
  • Specify the JVM to run Eclipse with
+90
java performance windows intellij-idea
Apr 13 2018-11-11T00:
source share
12 answers

This combination works great on my Intellij13 working in Mavericks:

Updated July 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 am constantly updating this setting at https://github.com/adben/config/blob/master/idea64.vmoptions

+31
Jan 25 '14 at 14:29
source share

For me, switching to an SSD has significantly improved performance (especially for large projects).

+28
Apr 25 '11 at 3:50 a.m.
source share

Regarding

How to hide this cmd window while running intelliJ via .bat?

Use the "start" command and javaw.exe together, so if you have:

 SET JAVA_EXE=%IDEA_JDK%\jre\bin\java.exe ... "%JAVA_EXE%" %JVM_ARGS% -cp "%CLASS_PATH%" %IDEA_MAIN_CLASS_NAME% %* 

change it to:

 SET JAVA_EXE=%IDEA_JDK%\jre\bin\javaw.exe ... start "Intellij IDEA" /b "%JAVA_EXE%" %JVM_ARGS% -cp "%CLASS_PATH%" %IDEA_MAIN_CLASS_NAME% %* 
+20
Apr 13 2018-11-18T00:
source share

The most useful thing you can do for IntelliJ is to have a lot of free memory for disk caching. IntelliJ saves a lot of processing in cached files. This works well if you have a lot of free memory, but if your disk cache is limited, you will see regular long pauses.

I would suggest -XX:+UseConcMarkSweepGC , not G1 .

I also work with local copies of files to minimize file access latency.

BTW: for the project in which I am included, I noticed a difference between working on a machine with 24 GB and one with 48 GB, although the maximum heap is set to 2 GB;)

+19
Apr 13 2018-11-11T00:
source share

Some time ago I was looking for ways to speed up the compilation of a project, and this is the result. This is not for IntelliJ IDEA itself, but it will help a lot when (re) building large projects, and, I think, it will work with any other IDEs. In addition, I described the Linux approach, but I'm sure Windows has its own version of the RAM disk.

The easiest way to speed up compilation is to move the compilation output to a RAM disk.

RAM disk installation

Open fstab

 $ sudo gedit /etc/fstab 

(you can use vi or whatever instead of gedit )

Setting the mount point of the RAM disk

I use RAM disks in several places on my system, and one of them is /tmp , so I just put my compiler:

 tmpfs /var/tmp tmpfs defaults 0 0 

In this case, the size of your file system will not be limited, but this is normal, my size /tmp now 73 MB. But if you are afraid that the size of the RAM disk will become too large, you can limit its size, for example:

 tmpfs /var/tmp tmpfs defaults,size=512M 0 0 

Project setup

In IntelliJ IDEA, open the project structure ( Ctrl+Alt+Shift+S by default), then go to Project - “Project Compiler Output” and move it to the RAM mount point:

 /tmp/projectName/out 

(I added the projectName folder to easily find it if I need to get there or will work with several projects at the same time)

Then go to Modules, and in all your modules go to "Paths" and select "Inherit path to compile the project" or, if you want to use your own path to compile, change the "Output path" and "Check the output path" as you did to design compiler output earlier.

That is all, people!

PS Several numbers: the time of my current compilation of the project in different cases (approximately):

 HDD: 80s SSD: 30s SSD+RAM: 20s 

PPS If you use an SSD, in addition to speeding up compilation, you will reduce the write operations on your disk, so this will also help your SSD live happily ever after;)

+19
Apr 02 '14 at 19:53
source share

I experimented a bit and found that the following combination works best to reduce GC pauses: -XX: + UseConcMarkSweepGC -XX: SoftRefLRUPolicyMSPerMB = 50.

I would not have made too much heap, 512 or even less for me. Otherwise, when it becomes full, the GC will have to go through all this, which takes some time.

+4
Jun 15 '12 at 18:53
source share

Here you can find helpful tips. For example, the speed of switching from IDEA to another application and vice versa has improved significantly after disabling the "Turn off file synchronization" function.

http://hamletdarcy.blogspot.com/2008/02/10-tips-to-increase-intellij-idea.html

+2
Jun 15 '12 at 10:15
source share

Not sure why it hasn't been mentioned yet - you can enable Power Save mode , which disables background IJ actions, including Files Synchronization . Some articles say that you can disable File Sync in the project structure parameters (for example, in the article in response to @ OJ278), but I could not find this parameter in IJ 14 , but Power Save mode seems to disable it.

I have a rather large code base ( AOSP ), so HD activity is annoying due to synchronization of background files ...

+2
Apr 20 '15 at 23:05
source share

You can use the intellij optimizer plugin:

https://zeroturnaround.com/free/optimizer-for-intellij-idea/

Using the plugin you can:

  • Parameters for automatically configuring virtual machine settings
  • Disable class validation
  • Clearing system caches
  • Customize external build tools
  • Confirm Latest Oracle JDK
  • Skip build and redeploy
+1
Apr 26 '16 at 4:42 on
source share

The answer provided by adben is very useful for improving the performance of my machine. Although I rewrote it a bit after reading the Dzone article,

 -server -Xms2g -Xmx2g -XX:NewRatio=3 -Xss16m -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:ConcGCThreads=4 -XX:ReservedCodeCacheSize=240m -XX:+AlwaysPreTouch -XX:+TieredCompilation -XX:+UseCompressedOops -XX:SoftRefLRUPolicyMSPerMB=50 -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djsse.enableSNIExtension=false -ea 

They improved the productivity of large projects using the above configuration, and work flawlessly for our projects. Finally, I disabled all the plugins that I will not use, and this will also improve the situation.

Link: https://dzone.com/articles/the-one-and-only-reason-to-customize-intellij-idea

+1
Sep 25 '18 at 8:40
source share

I used this combination and it works fine in my environment

 -server -Xms2048m -Xmx2048m -XX:NewSize=512m -XX:MaxNewSize=512m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=8 -XX:+UseCodeCacheFlushing -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts -XX:+CMSClassUnloadingEnabled -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:+CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=65 -XX:+CMSScavengeBeforeRemark -XX:+UseCMSInitiatingOccupancyOnly -XX:ReservedCodeCacheSize=64m -XX:-TraceClassUnloading -ea -Dsun.io.useCanonCaches=false 
0
Jul 19 '17 at 7:02
source share
0
Jun 15 '19 at 8:21
source share



All Articles