Why is javac 1.5 running so slowly compared with the Eclipse compiler?

后端 未结 8 2009
别跟我提以往
别跟我提以往 2021-02-04 16:27

I have a Java Maven project with about 800 source files (some generated by javacc/JTB) which is taking a good 25 minutes to compile with javac.

When I changed my pom.xml

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-04 16:49

    I don't know how maven calls the compiler but the performance numbers you mention suggest that javac is executed in it's own process/VM as already suggested in another answer. As starting a new process/VM for every file you compile is very costly you need to ensure to configure the compiler to use the VM you might alreay have. I know ANT offers that, but I have not used maven myself. Given the fact that it is popular I doubt that it lacks such an important feature though.

提交回复
热议问题