Elijah
Elijah

Reputation: 13604

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

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.

Upvotes: 22

Views: 5498

Answers (1)

krosenvold
krosenvold

Reputation: 77201

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.

Upvotes: 6

Related Questions