On Fri, Apr 11, 2008 at 7:21 PM, Simone Gianni <[EMAIL PROTECTED]> wrote:

> Hi Dana,
> you are absolutely right, but there are a few things Maven could do to
> improve speed : using multiple threads/cpus :
> - Maven downloads stuff. Now, since the network exists, it exists
> latency, and all net applications work best when multithreaded. Is maven
> currently parallelizing the jar downloads/the connections it makes to
> test if there are new releases of the artifacts? That could speed up a
> lot, expecially on first time users, first time they download stuff,
> first time they see maven as slow :)
> - Unit tests are, by DEFINITION, parallelizable. Maven could create more
> of one instance of the test runner, create a shared list of test
> methods, and have various instances run on different threads and pick a
> test method from the list. Failure of a test does not stop execution of
> other tests in the same package, so it's safe to do so.
>

+1 on both points.


>
> On the build process itself, it has no meaning to parallelize it as you
> properly pointed out.
>

Sorry to be persistent about this, but the build process is exactly where i
think the most gains are to be made. Parallelizing downloads is for sure a
winner and perhaps potential low-hanging fruit, but after the first clean
install you spend 98% of your time in the build _not_ downloading anything.
Instead, for each artifact you're sequentially going through all of the
lifecycle phases :

validate
generate-sources
process-sources
generate-resources
process-resources
compile
process-classes
generate-test-sources
process-test-sources
generate-test-resources
process-test-resources
test-compile
process-test-classes
test
prepare-package
package
pre-integration-test
integration-test
post-integration-test
verify
install
deploy

So why not run this cycle in parallel for completely unrelated artifacts ?
Yes I know the repo is not threadsafe but for unrelated artifacts that would
not even be an issue as long as you're not invoking 2 separate maven
instances at the same time.

Cheers,
Jorg

Reply via email to