-
Bug
-
Resolution: Fixed
-
Major
When the number of parallel branches in pipeline increases a lot, the performance of the pipeline decreases significantly. There appears to be an n^2 algorithm somewhere.
~200 branches - okay
4k branches - glacial
Attached is a stack trace taken while the behavior was exibited. I'm pretty sure this ends up n^2:
"Running CpsFlowExecutionOwner[corex_full/54:corex_full #54]" Id=421 Group=main RUNNABLE
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.getCurrentHeads(CpsFlowExecution.java:703)
- locked org.jenkinsci.plugins.workflow.cps.CpsFlowExecution@6ebdc0a3
at org.jenkinsci.plugins.workflow.support.actions.LogActionImpl.isRunning(LogActionImpl.java:152)
at org.jenkinsci.plugins.workflow.support.actions.LogActionImpl.access$000(LogActionImpl.java:66)
at org.jenkinsci.plugins.workflow.support.actions.LogActionImpl$1.onNewHead(LogActionImpl.java:93)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1081)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.notifyNewHead(CpsThreadGroup.java:381)
at org.jenkinsci.plugins.workflow.cps.FlowHead.setNewHead(FlowHead.java:119)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:171)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
The code walks the heads every time a new head is added.
- blocks
-
JENKINS-38381 [JEP-210] Optimize log handling in Pipeline and Durable Task
- Resolved
- depends on
-
JENKINS-38223 FlowNode.isRunning is not very useful
- Closed
- is duplicated by
-
JENKINS-42937 Massive slowdown of pipeline execution when making massive use of parallel
- Resolved
- relates to
-
JENKINS-45553 Parallel pipeline execution scales poorly
- Closed
- links to