maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason van Zyl (JIRA)" <>
Subject [jira] (MNG-5312) MavenProject.getParent intolerably slow when import scope used heavily
Date Wed, 18 Jul 2012 01:18:21 GMT


Jason van Zyl closed MNG-5312.

    Resolution: Fixed

Patch applied. Thanks.
> MavenProject.getParent intolerably slow when import scope used heavily
> ----------------------------------------------------------------------
>                 Key: MNG-5312
>                 URL:
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Embedding
>    Affects Versions: 3.0.4
>         Environment: JDK 7, Ubuntu
>            Reporter: Jesse Glick
>            Assignee: Jason van Zyl
>         Attachments: DefaultProjectBuilder.diff
> For projects which make heavy use of {{<scope>import</scope>}} including
in parent POMs, calling {{MavenProject.getParent}} (thus {{,
...)}}) can be intolerably slow - taking many minutes - even when loading the project (or
its parent) via {{<File>, ...)}} takes less than a second.
> The discrepancy seems to be due to the fact that {{ReactorModelCache}} is crucial for
the performance of {{DefaultModelBuilder.importDependencyManagement}}, yet only one {{}}
overload defines a {{ModelCache}}. For resolution of parents from a single POM, no model cache
is likely to be needed under normal circumstances, but if you are missing a cache when import
scope dependencies are processed for {{<dependencyManagement>}}, the builder takes exponential
time to find these imports.
> I do not have a minimal test case for this yet as the known test case involves a large
and complex proprietary source base. Patch (baseline is 3.0.4) successfully tested against
these sources and shown to reduce {{getParent}} times by orders of magnitude.
> is the downstream issue describing

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message