Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.5.0, 3.5.2
Description
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.
Attachments
Attachments
Issue Links
- causes
-
MNG-6412 Exceeding project discovery time when using CI friendly versions
- Closed
-
MNG-6530 Regression in ProjectBuilder when file change between invocations (introduced by MNG-6311)
- Closed
- is related to
-
MNG-6616 Create public API for Projects Artifacts Cache where one project can be invalidated
- Open
- relates to
-
MNG-7027 Invalidate project cache upon changes
- Open
- links to