[ https://issues.apache.org/jira/browse/MNG-8396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet closed MNG-8396. -------------------------------- Assignee: Guillaume Nodet (was: Tamas Cservenak) Resolution: Fixed > Maven takes forever to resume > ----------------------------- > > Key: MNG-8396 > URL: https://issues.apache.org/jira/browse/MNG-8396 > Project: Maven > Issue Type: Bug > Affects Versions: 4.0.0-rc-1 > Reporter: Guillaume Nodet > Assignee: Guillaume Nodet > Priority: Major > Fix For: 4.0.0-rc-2 > > > When resuming a huge build (such as Quarkus), the build plan takes forever to > compute. > The stack trace is the following > {code} > "main" #1 [8963] prio=5 os_prio=31 cpu=97044.39ms elapsed=106.70s > tid=0x000000013700e800 nid=8963 runnable [0x000000016b481000] > java.lang.Thread.State: RUNNABLE > at > java.util.stream.AbstractPipeline.<init>(java.base@21.0.4/AbstractPipeline.java:209) > at > java.util.stream.ReferencePipeline.<init>(java.base@21.0.4/ReferencePipeline.java:96) > at > java.util.stream.ReferencePipeline$StatefulOp.<init>(java.base@21.0.4/ReferencePipeline.java:829) > at > java.util.stream.SortedOps$OfRef.<init>(java.base@21.0.4/SortedOps.java:126) > at > java.util.stream.SortedOps.makeRef(java.base@21.0.4/SortedOps.java:63) > at > java.util.stream.ReferencePipeline.sorted(java.base@21.0.4/ReferencePipeline.java:562) > at > org.apache.maven.graph.DefaultProjectDependencyGraph.getSortedProjects(DefaultProjectDependencyGraph.java:155) > at > org.apache.maven.graph.DefaultProjectDependencyGraph.getUpstreamProjects(DefaultProjectDependencyGraph.java:141) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.applyFilter(FilteredProjectDependencyGraph.java:102) > at > org.apache.maven.graph.FilteredProjectDependencyGraph.getUpstreamProjects(FilteredProjectDependencyGraph.java:82) > at > org.apache.maven.lifecycle.internal.ProjectSegment.<init>(ProjectSegment.java:70) > at > org.apache.maven.lifecycle.internal.BuildListCalculator.calculateProjectBuilds(BuildListCalculator.java:59) > at > org.apache.maven.lifecycle.internal.DefaultLifecycleStarter.execute(DefaultLifecycleStarter.java:92) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:311) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:225) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:149) > at > org.apache.maven.cling.invoker.mvn.MavenInvoker.doExecute(MavenInvoker.java:495) > at > org.apache.maven.cling.invoker.mvn.MavenInvoker.execute(MavenInvoker.java:99) > at > org.apache.maven.cling.invoker.mvn.MavenInvoker.execute(MavenInvoker.java:89) > at > org.apache.maven.cling.invoker.LookupInvoker.doInvoke(LookupInvoker.java:142) > at > org.apache.maven.cling.invoker.LookupInvoker.invoke(LookupInvoker.java:113) > at org.apache.maven.cling.ClingSupport.run(ClingSupport.java:64) > at org.apache.maven.cling.MavenCling.main(MavenCling.java:51) > at > java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.base@21.0.4/DirectMethodHandle$Holder) > at > java.lang.invoke.LambdaForm$MH/0x00000008000c4400.invoke(java.base@21.0.4/LambdaForm$MH) > at > java.lang.invoke.LambdaForm$MH/0x00000008000c4800.invokeExact_MT(java.base@21.0.4/LambdaForm$MH) > at > jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(java.base@21.0.4/DirectMethodHandleAccessor.java:155) > at > jdk.internal.reflect.DirectMethodHandleAccessor.invoke(java.base@21.0.4/DirectMethodHandleAccessor.java:103) > at java.lang.reflect.Method.invoke(java.base@21.0.4/Method.java:580) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201) > at > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361) > at > org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314) > {code} > I think a simple cache layer should avoid recomputing the same > {{getUpstreamProjects}} list again and again... -- This message was sent by Atlassian Jira (v8.20.10#820010)