[ https://issues.apache.org/jira/browse/MNG-6311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16594231#comment-16594231 ]
Sylwester Lachiewicz commented on MNG-6311: ------------------------------------------- Test with [~dchr] patch on the public spring-boot project (pre-warmed with mvn clean to download all dependencies) {noformat} c:\p\spring-boot>\programs\apache-maven-3.5.4\bin\mvn clean 1080 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects... 18247 [WARNING] org.apache.maven.DefaultMaven - The project org.springframework.boot:spring-boot-parent:pom:2.1.0.BUILD-SNAPSHOT [..] 18280 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------ 18296 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - Reactor Build Order: 18315 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - 18323 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - Spring Boot Build [pom] ... 31813 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - Total time: 30.753 s 31829 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2018-08-27T23:05:53+02:00 31841 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------ {noformat} {noformat} c:\p\spring-boot>\programs\apache-maven-3.6.0-6311\bin\mvn clean 1199 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects... 4902 [WARNING] org.apache.maven.DefaultMaven - The project org.springframework.boot:spring-boot-parent:pom:2.1.0.BUILD-SNAPSHOT [..] 4926 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------ 4932 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - Reactor Build Order: 4936 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - 4941 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - Spring Boot Build [pom] ... 16102 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - Total time: 14.927 s 16121 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2018-08-27T23:07:26+02:00 16131 [INFO] org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------{noformat} Without the patch, the initial scan takes *17,1sec* and with the patch applied - only *3,7sec* [~tnikolay] could help us with testing and try build maven from [https://github.com/slachiewicz/maven/tree/fix/MNG-6311] and share results? > Maven intolerably slow when import scope used heavily in large project > ---------------------------------------------------------------------- > > Key: MNG-6311 > URL: https://issues.apache.org/jira/browse/MNG-6311 > Project: Maven > Issue Type: Bug > Components: core, Performance > Affects Versions: 3.5.0, 3.5.2 > Reporter: David Churcher > Priority: Major > Labels: performance > Attachments: Call-tree-–-All-threads-together.html, > anon-hierarchy-maven-output.zip, modelcachefix.diff > > > 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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)