On 19 Dec 07, at 11:10 AM 19 Dec 07, Milos Kleint wrote:

Hello,

i've started building my project with current 2.1-SNAPSHOT trunk and I noticed the build is taking more time than before. I did a bit of profiling. I've executed "mvn install" on a set of 24 projects, all build before, right before the profiling test.

What struck me is that half of the time seems to be spent in DefaultPluginManager.resolveTransitiveDependencies(). See attached picture from netbeans profiler. It was executed 82 times. I suppose the root of the problem will be somewhere much deeper and I guess there's a way to optimize the number of calls to the method as well. After a bit of debugging i figured that for a single project this method is called multiple times during execution. First the "compile" scope is resolved, later "runtime" or "test" eventually (depends on actual plugins bound to the project) Ideally it should be called 24 times max as far as I understand the problem. The BuildPlan should know up front what mojos will be executed and what is the maximum level or dependency resolution for the given project.

Agreed? Is that something that I should pursue further or am I on the wrong track?


Sure, take a look but in the plugin manager I started ripping out all the optimizations after ripping out a bunch of other code. But narrow it down for one build where

1) You don't have anything downloaded i.e. a clean repository, and
2) Where you have all the dependencies downloaded

For one pass it shouldn't be resolving more then once for each plugin. I wouldn't try to start caching anything but if you're seeing more then one call per plugin then something needs to be reworked.

Milos

PS: If anyone is interested I can send the actual netbeans profiler dump files for browsing (via private email).



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

believe nothing, no matter where you read it,
or who has said it,
not even if i have said it,
unless it agrees with your own reason
and your own common sense.

-- Buddha



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to