A basic Hello World program takes 10 seconds on a newly installed IDEA

Answered

Hi, 

I needed a very basic java IDE, that is light-weight, and easy to use. So I just installed IDEA on my Ubuntu 16, disabled the extra during initial setup, and tried to run a Hello World program, which even when run on a terminal, would take less than a second to compile and execute. But in the case of IDEA, the build has run for some 10 seconds. I'm not sure why this build should have run and for so long for a very basic program with a single class. 

Please help me, maybe I haven't dome something as expected during installation. By the way, I know my laptop has decent configuration, and I know that it runs the Eclipse programs within a second.

0
3 comments

Do you use Maven/Gradle? What JDK do you use? Do you have antivirus/firewall?

Please take a look: Antivirus Impact on Build Speed.

Also check that the loopback address is configured property in /etc/hosts file - that it has the only mapping to localhost as 

127.0.0.1 localhost

Try -Dcompiler.ref.index=false into Help | Edit Custom VM Options and restart IDE.

0
Avatar
Permanently deleted user

Andrey Dernov

I have tried that setting, but it still is the same, it takes ~10 seconds. Could you tell me how much time ideally should be taken by IntelliJ to run a Hello world java program?

I'm actually not sure if Gradle is the right solution to be used for simple programs, as I know that Eclipse, nor the command line that compile much faster don't use it.

 

0

Running simple project with one Main class for the 1st time takes about 4 seconds and about 2-3 sec for the subsequent runs when I'm using IDE's builder and Javac compiler (Settings | Build, Execution, Deployment | Compiler | Java Compiler) from 1.8 Project JDK.

What are you computer specifications? Do you have network mounted drivers? AV/firewall or any program that may slow down IDE operations?

If issue remains provide idea.log and build.log files (with debug level enabled): https://intellij-support.jetbrains.com/hc/en-us/articles/207241085 and a sample project to check.

0

Please sign in to leave a comment.