maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé Boutemy (JIRA) <j...@apache.org>
Subject [jira] [Commented] (MRRESOURCES-106) ProcessRemoteResourcesMojo#getProjects() can end up consuming a lot of memory for big projects
Date Mon, 24 Sep 2018 21:21:00 GMT

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

Hervé Boutemy commented on MRRESOURCES-106:
-------------------------------------------

oh, I just understood that "getProjects()" is not "get projects from reactor" but "get current
project dependencies"...
in fact, I don't get why we get these dependencies as MavenProject, since we won't build them:
probably org.apache.maven.model.Model would be less costly

> ProcessRemoteResourcesMojo#getProjects() can end up consuming a lot of memory for big
projects
> ----------------------------------------------------------------------------------------------
>
>                 Key: MRRESOURCES-106
>                 URL: https://issues.apache.org/jira/browse/MRRESOURCES-106
>             Project: Maven Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.5
>            Reporter: Thomas Mortagne
>            Assignee: Hervé Boutemy
>            Priority: Major
>
> At XWiki we are using the remote resource plugin to generate a NOTICE files we put in
the META-INF of all jars. The file can be found on https://github.com/xwiki/xwiki-commons/blob/master/xwiki-commons-tools/xwiki-commons-tool-license-resources/src/main/resources/META-INF/NOTICE.vm.
> We have a lot of memory issues and we kept increasing the max memory but it was starting
to be a bit insane (we now get a OOM with -Xmx2500m) so I finally took a profiler to try to
figure out where all this memory goes.
> We did noticed for a while that remote resource plugin is taking longer and longer to
execute during the build so I had my doubts already.
> What Yourkit is telling me is that almost half of the memory (400MB here because I reduced
the max memory for it to fail earlier) is retained by an ArrayList of MavenProject instances
located in ProcessRemoteResourcesMojo#getProjects().
> It can be reproduced by building https://github.com/xwiki/xwiki-platform (you will need
to add some repositories in your settings.xml, you can find them on http://dev.xwiki.org/xwiki/bin/view/Community/Building/#HInstallingMaven).
> Also I can probably put the memory dump I have somewhere if someone wants to download
it.



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

Mime
View raw message