caiwei-ebay commented on pull request #158:
URL: https://github.com/apache/maven-resolver/pull/158#issuecomment-1070824708


   
   > @caiwei-ebay @michael-o @ibabiankou @jebeaudet IMO, this PR is good to be 
merged, so let's merge it.
   > 
   > I personally am not quite convinced about this (BFS + skipper), I'd need 
more tests, and would like to see how these "scale" as well (test on project 
with 100, 200, 400 modules and so on).
   
   @michael-o @cstamas 
   
   Actually Skipper does not help with multi module project. Maven builds 
module one by one, this means Maven will call 
[collectDependencies](https://github.com/bfs-skip/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L166)
 one by one for each module, and thus the cache (Args.pool, not a static one) 
won't be reused among the resolution of multiple modules. This means if we can 
reuse Args.pool (make map static & concurrent safe 
[here](https://github.com/bfs-skip/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DataPool.java#L72)),
  it should be faster when building multiple modules. I would like to try that 
in near future, maybe after @ibabiankou's PR.
   
   Skipper only helps avoid unnecessary duplicate node resolution, it does 
least help for maven projects developed by maven experts like Spring as they 
have managed dependency versions very well and exclusions are rarely used.  To 
print dependency:tree of entire spring-boot project (with large number of 
modules), it would take just 20s with my windows desktop.
   
   To be frank, it is not a common case in Opensource or people using 
Opensource project, this is why I say this skipper solution is only helpful for 
large projects with complex dependencies (micro service tech is not employed, 
people rely on libraries developed by other team to call APIs provided by 
them). 
   
   The tests 
[here](https://github.com/bfs-skip/maven-resolver/blob/master/maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollectorUseSkipTest.java#L83)
 actually demonstrate the case:  same node with different exclusions, the 2nd 
one will be skipped as it is the loser node.
   
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to