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

Xiong Luyao edited comment on MNG-7509 at 7/9/22 2:29 AM:
----------------------------------------------------------

Here is the comparison for same project build for the change. As the report, 
the max memory reduced from ~2.5G to ~1.5G, and the GC duration reduced from 
~7s to ~0.7s

Before:
!image-2022-07-09-10-27-56-437.png|width=344! 
!image-2022-07-09-10-29-04-045.png|width=344!

After:
!image-2022-07-09-10-29-15-822.png|width=340!
!image-2022-07-09-10-29-21-991.png|width=341!

 

 


was (Author: JIRAUSER292130):
Here is the comparison for same project build for the change. As the report, 
the max memory reduced from ~2.5G to ~1.5G, and the GC duration reduced from 
~7s to ~0.7s

Before:
!image-2022-07-09-10-27-56-437.png|width=344! 
!image-2022-07-09-10-28-22-864.png|width=344!
After:
!image-2022-07-09-10-28-35-341.png|width=344!
!image-2022-07-09-10-28-40-612.png|width=344!
 

 

> Huge memory cost when parent pom widely used in a big project for 
> dependencyManagement
> --------------------------------------------------------------------------------------
>
>                 Key: MNG-7509
>                 URL: https://issues.apache.org/jira/browse/MNG-7509
>             Project: Maven
>          Issue Type: Improvement
>          Components: Performance
>            Reporter: Xiong Luyao
>            Priority: Major
>         Attachments: image-2022-07-09-09-37-53-823.png, 
> image-2022-07-09-09-38-26-354.png, image-2022-07-09-10-27-12-668.png, 
> image-2022-07-09-10-27-56-437.png, image-2022-07-09-10-28-05-706.png, 
> image-2022-07-09-10-28-22-864.png, image-2022-07-09-10-28-35-341.png, 
> image-2022-07-09-10-28-40-612.png, image-2022-07-09-10-29-04-045.png, 
> image-2022-07-09-10-29-15-822.png, image-2022-07-09-10-29-21-991.png
>
>
> When maven try to resolve dependency relationship, it will create many 
> objects of dependency / artifact. Even the dependency/artifact content is 
> totally same, but just in different models. It cost huge memory if there is a 
> big dependencyManagement parent pom in each dependencies of the project.
>  
> Here is a real case. As below picture, there is over 3000 business domain 
> libraries, each library may rely on several other libraries among them. So 
> the library which didn’t rely on each other will be built first and the 
> library only relies on the built libraries will be built, until all the 
> libraries have been built. In this way, we use a parent pom to maintain the 
> version of these 3000+ libraries version and make each library introduce it. 
> So that it can keep all the libraries are built from same base.
> But it costs huge memory in above ways to built libraries. And even the 
> libraries have been released, if the project which contains a lot of above 
> libraries, it also cost huge memory when building project.
>  
> !image-2022-07-09-09-37-53-823.png|width=493,height=226!
>  
> Here is a thread dump when building a real project with above libraries. The 
> top 5 objects are all related to org.eclipse.aether.graph.Dependency.
> !image-2022-07-09-09-38-26-354.png|width=510,height=199!
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to