Using multiple cores/processors when compiling Java

前端 未结 6 634
梦如初夏
梦如初夏 2020-12-13 19:30

I use a desktop with eight cores to build a Java application using Ant (through a javac target). Is there a way to speed up the compilation by using more than one thread or

6条回答
  •  清歌不尽
    2020-12-13 19:40

    You can use Buck Build to increase your build speed and utilize multiple cores.

    In a nutshell:

    Buck is a build system developed and used by Facebook. It encourages the creation of small, reusable modules consisting of code and resources, and supports a variety of languages on many platforms.

    Buck builds independent artifacts in parallel to take advantage of multiple cores on your machine. Further, it reduces incremental build times by keeping track of unchanged modules so that the minimal set of modules is rebuilt.

提交回复
热议问题