You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "wei cai (Jira)" <ji...@apache.org> on 2021/11/27 05:08:00 UTC
[jira] [Created] (MRESOLVER-228) Improve the maven dependency resolution speed by a skip & reconcile approach
wei cai created MRESOLVER-228:
---------------------------------
Summary: Improve the maven dependency resolution speed by a skip & reconcile approach
Key: MRESOLVER-228
URL: https://issues.apache.org/jira/browse/MRESOLVER-228
Project: Maven Resolver
Issue Type: Improvement
Components: Resolver
Affects Versions: 1.7.2
Reporter: wei cai
Attachments: Screen Shot 2021-11-27 at 12.58.26 PM.png, Screen Shot 2021-11-27 at 12.58.59 PM.png, Screen Shot 2021-11-27 at 12.59.32 PM.png
When comes to resolve the dependencies of an enterprise level project, the maven resolver is very slow to resolve the dependency graph/tree. Take one of our app as example, it could take 10minutes+ to print the result of mvn dependency:tree.
This is because the exclusion is considered as part of the cache key.
!Screen Shot 2021-11-27 at 12.58.26 PM.png!
To improve the maven resolver's dependency resolution speed, I implemented a skip & reconcile approach. Here is the *skip* part.
!Screen Shot 2021-11-27 at 12.58.59 PM.png!
Here is the *reconcile* part:
!Screen Shot 2021-11-27 at 12.59.32 PM.png!
After we enabled the resolver patch in maven, we are seeing 10% ~70% build time reduced, and besides the result mvn dependency:tree and mvn dependency:list remain the same.
We've verified the resolver performance patch by dryrun 2000+ apps in our company by comparing the mvn dependency:tree and mvn dependency:list result with/without the performance patch.
Please help review the PR.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)