maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Churcher (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MNG-6311) Maven intolerably slow when import scope used heavily in large project
Date Wed, 17 Jan 2018 23:46:00 GMT

    [ https://issues.apache.org/jira/browse/MNG-6311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16329702#comment-16329702
] 

David Churcher edited comment on MNG-6311 at 1/17/18 11:45 PM:
---------------------------------------------------------------

It's a bit tricky to share more details as we don't own the source for most of it, and a lot
of the project hierarchy is inside dependencies that we don't have any source for. I've attached
some anonymised output of the hierarchy-maven-plugin – [https://github.com/ExampleDriven/hierarchy-maven-plugin]
– which should give some idea of the scope of the parent POM problem. I will try to script
the creation of a similar project. 

Interestingly when I build the whole project from top down I don't get the performance problem,
it is only when I build the integration test project (as in the above hierarchy file) that
has low-level dependencies and has to work its way up the dependency tree.


was (Author: dchr):
It's a bit tricky to share more details as we don't own the source for most of it, and a lot
of the project hierarchy is inside dependencies that we don't have any source for. I've attached
some anonymised output of the hierarchy-maven-plugin - [https://github.com/ExampleDriven/hierarchy-maven-plugin|https://github.com/ExampleDriven/hierarchy-maven-plugin)] -
which should give some idea of the scope of the parent POM problem. I will try to script the
creation of a similar project. 

Interestingly when I build the whole project from top down I don't get the performance problem,
it is only when I build the integration test project (as in the above hierarchy file) that
has low-level dependencies and has to work its way up the dependency tree.

> Maven intolerably slow when import scope used heavily in large project
> ----------------------------------------------------------------------
>
>                 Key: MNG-6311
>                 URL: https://issues.apache.org/jira/browse/MNG-6311
>             Project: Maven
>          Issue Type: Bug
>          Components: core, Performance
>    Affects Versions: 3.5.0, 3.5.2
>            Reporter: David Churcher
>            Priority: Major
>              Labels: performance
>         Attachments: anon-hierarchy-maven-output.zip, modelcachefix.diff
>
>
> I have a build performance problem that is identical to MNG-5312, and has appeared since
MNG-6030 in Maven v3.5.0 reversed the patch for MNG-5312, removing the ModelCache from some
of the overloads for DefaultProjectBuilder.build. 
> As in MNG-5312 the problem is in a large proprietary project. It uses up to 8 levels
of parent POMs, many of which use the import scope and have large dependency-management sections,
and has hundreds of dependencies that also use the same parent POM hierarchy. Adding some
logging shows that Maven does over 800,000 uncached reads of parent POM files, which takes
about half an hour. With model caching this goes down to a few seconds.
> I've attached a patch that fixes this by using a class-level ModelCache in DefaultProjectBuilder.
This does not suffer from the memory usage problems reported in MNG-6030.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message