Speeding up Maven

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Speeding up Maven

Mark Raynsford

Is there any way I might speed up Maven? I've been using it for years
and, for the first time, I'm actually executing it from an IDE rather
than using the IDE's built-in compiler. It seems like there's a rather
large and apparently fixed amount of overhead per invocation. Take the
following "could not be simpler" project:


I piped the output through tai64n [1] to give a better indication of
exactly how long everything is taking. That's a project that compiles a
single Java file and produces a jar. It doesn't run any tests, it
doesn't include any resources. 16 seconds total execution [2]!

Now for an infrequent command-line build, that's not *too* obnoxious.
For a "click a button in the IDE because I want to try this bit of code
now" build, that's a world of suffering.

It seems like Maven first spends ten entire seconds doing not very
much. That cannot be attributed to JVM startup time (Hello World on my
system takes about 100ms to reach user code, and even the largest Java
application I still takes less than a second to reach user code after
all the classes have loaded).

Is there anything I can do to cut this down? If not, is this something
that's intended to be addressed in the near future?

[1] http://cr.yp.to/daemontools/tai64n.html
[2] The Maven output claims 6 seconds, but that doesn't include the
    time it took for the build to start.

Mark Raynsford | http://www.io7m.com

attachment0 (235 bytes) Download Attachment