简体   繁体   中英

Why it takes so long for intelliJ IDEA to build a Hello world in Java?

I created a simple Hello world Java program. Every time I change a single line of the file in IntelliJ (not even adding any code, just add a blank new line), and then run it, it will take 2.5~3.5 sec to build it and run.

If I don't change anything and just rerun it, it will take like 1 sec.

Why it take so long to build just a hello world program? Is this normal?

Building time


I am switching from Eclipse to IntelliJ IDEA. This is a new IntelliJ just installed without any plugin.

I tried to change the settings, increase the heap size, none of those help. Heap Setting

I do not have any anti-virus except the Windows Defender. I don't think this is causing any trouble.

I tried to search online, they are mostly talking about slow build time in large projects, but mine is just a simple hello world program, and I don't think it should have such problem.

When I use Eclipse in the same computer, I run the code (not only a simple hello world program), and the output will take less than 0.5 sec to show up.

Using Windows 10, IntelliJ IDEA 2020.3 x64.

When I change the code re-run takes about 2.6sec b/c of compilation. But when I do not change anything rerun is instant and I see All files are up-to-date message.

在此处输入图像描述

Do you have a sense that you wait more than that? Check Windows Defender options, try with it disabled or make sure that IDE settings directories IDE installation home and project files are excluded from the scan. If project/IDE settings directories are located not on a local drive it also could take longer time to build.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM