You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/02/24 00:20:43 UTC

[GitHub] [maven] AlexanderAshitkin commented on a change in pull request #290: [MNG-6774] - Speedup project graph build by paralleling operations

AlexanderAshitkin commented on a change in pull request #290: [MNG-6774] - Speedup project graph build by paralleling operations
URL: https://github.com/apache/maven/pull/290#discussion_r383054404
 
 

 ##########
 File path: maven-core/src/main/java/org/apache/maven/graph/DefaultGraphBuilder.java
 ##########
 @@ -401,18 +403,49 @@ else if ( selectedProject.isDirectory() )
             return projects;
         }
 
-        List<File> files = Arrays.asList( request.getPom().getAbsoluteFile() );
+        List<File> files = Collections.singletonList( request.getPom().getAbsoluteFile() );
         collectProjects( projects, files, request );
         return projects;
     }
 
-    private void collectProjects( List<MavenProject> projects, List<File> files, MavenExecutionRequest request )
-        throws ProjectBuildingException
+    private void collectProjects( List<MavenProject> projects, final List<File> files,
+                                  final MavenExecutionRequest request ) throws ProjectBuildingException
     {
-        ProjectBuildingRequest projectBuildingRequest = request.getProjectBuildingRequest();
+        final ProjectBuildingRequest projectBuildingRequest = request.getProjectBuildingRequest();
+
+        List<ProjectBuildingResult> results;
+        long start = System.currentTimeMillis();
+        if ( request.getDegreeOfConcurrency() <= 1 || Boolean.getBoolean( "maven.concurrentGraph.disable" ) )
 
 Review comment:
   Hi
   in any case need to cap resources allocated at this step as build owner needs to control his environment. if user set -T flag we can assume he gave consent that build can use up to those CPU resources . So using DegreeOfConcurrency sounds natural for me. To make it more fine grained it is possible to introduce additional control flags, but i decided to not complicate configuration at this point

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services