分布式Java编译器 [英] Distributed Java Compiler

查看:136
本文介绍了分布式Java编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有针对Java的分布式编译器,类似于distcc for C / C ++?

Is there a distributed compiler for Java, analogous to distcc for C/C++?

推荐答案

没有。但是,它可能不会帮助你反正...编译Java是非常快。

The direct answer to your question is "no". However, it probably would not help you anyway… compiling Java is very fast.

在一个小项目,编译是足够快,你不应该真的关心。在一个大型项目中,你需要处理通过网络编译的文件,并且必须处理潜在的也可以跨越许多兆字节的依赖性。

On a small project, the compilation is fast enough that you shouldn't really care. On a large project you would need to deal with throwing the file to compile over a network, and having to deal with potentially also throw across many megabytes of dependencies as well.

你可以做一些事情来提高你的编译速度是使用 eclipse编译器而不是Sun javac。 Eclipse编译器是多线程的,所以会运气,使用你机器的所有内核。

One thing that you can do to improve your compilation speed is to use the eclipse compiler instead of the Sun javac. The Eclipse compiler is multi-threaded, and so will, with luck, use all the cores of your machine.

这也许值得一提的是苹果最近减少distcc支持,因为一般来说,在较新的硬件,它花费更多的时间来获取代码在别的地方编译和回来,比它只是做本地编译。引用Apple:

It is probably also worth mentioning that Apple also recently reduced distcc support, since in general, on newer hardware, it cost more time to get the code somewhere else to compile and back, than it did to just do the compilation locally. To quote Apple:


Xcode的单机构建性能已经提高到分布式网络构建的分布式构建慢于在大多数情况下本地构建。

The single-computer build performance of Xcode has been improved to the point that distributed building with Distributed Network Builds is slower than local builds in most circumstances.

这篇关于分布式Java编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆