Is there a way to improve multicore / multiprocessor performance of the Java compiler?

╄→гoц情女王★ 提交于 2019-11-29 16:30:32

问题


My coworker noticed that when javac is compiling it only utilizes a single core. Is there anything like the -j command with the gcc for Java that will allow us to distribute the compiler workload across cores or processors? If not, do you think that this will ever be possible or is there some sort of fundamental restriction as a result of Java's design?

The environment is Linux with the Sun J2SE 1.6.0.11 jdk.


回答1:


Although not exactly an answer to your question, some build environments like ant also support parallelization of builds, so if your dependency graph permits you can have multiple javac's running at the same time.



来源:https://stackoverflow.com/questions/523575/is-there-a-way-to-improve-multicore-multiprocessor-performance-of-the-java-com

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!