Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38867

Major Optimization: Create and Use FlowNode.getAction w/o TransientActionFactories

      In most cases we only care about the directly attached actions on flownodes. FlowNode.getAction has been identified as ~25% of runtime for pipeline flow analysis, and it is likely b/c this queries all TransientActionFactories for actions.

      We should:

      1. Add a FlowNode.getAction API version (name TBD) that only iterates through the directly added actions (already cached in-object)
      2. Switch the pipeline-graph-analysis plugin and stage view's REST API to use this exclusively
      3. Benchmark to see what the performance difference is

      UPDATE: Doubles stage view performance, which should carry through to a large extent anywhere we use flow analysis.

          [JENKINS-38867] Major Optimization: Create and Use FlowNode.getAction w/o TransientActionFactories

          Sam Van Oort created issue -
          Sam Van Oort made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Jesse Glick added a comment -

          As noted in the PR I think this cannot happen.

          Jesse Glick added a comment - As noted in the PR I think this cannot happen.

          Sam Van Oort added a comment -

          As noted in the PR, I think you have misunderstood the intended use case.

          Sam Van Oort added a comment - As noted in the PR, I think you have misunderstood the intended use case.
          Sam Van Oort made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Sam Van Oort made changes -
          Description Original: In most cases we only care about the directly attached actions on flownodes. FlowNode.getAction has been identified as ~25% of runtime for pipeline flow analysis, and it is likely b/c this queries all TransientActionFactories for actions.

          We should:

          1. Add a FlowNode.getAction API version (name TBD) that only iterates through the directly added actions (already cached in-object)
          2. Switch the pipeline-graph-analysis plugin and stage view's REST API to use this exclusively
          3. Benchmark to see what the performance difference is
          New: In most cases we only care about the directly attached actions on flownodes. FlowNode.getAction has been identified as ~25% of runtime for pipeline flow analysis, and it is likely b/c this queries all TransientActionFactories for actions.

          We should:

          1. Add a FlowNode.getAction API version (name TBD) that only iterates through the directly added actions (already cached in-object)
          2. Switch the pipeline-graph-analysis plugin and stage view's REST API to use this exclusively
          3. Benchmark to see what the performance difference is

          UPDATE: *50% improvement in stage view performance, which should carry through to a large extent anywhere we use flow analysis.*
          Sam Van Oort made changes -
          Component/s Original: pipeline-graph-analysis-plugin [ 21693 ]
          Component/s Original: pipeline-stage-view-plugin [ 21139 ]
          Sam Van Oort made changes -
          Description Original: In most cases we only care about the directly attached actions on flownodes. FlowNode.getAction has been identified as ~25% of runtime for pipeline flow analysis, and it is likely b/c this queries all TransientActionFactories for actions.

          We should:

          1. Add a FlowNode.getAction API version (name TBD) that only iterates through the directly added actions (already cached in-object)
          2. Switch the pipeline-graph-analysis plugin and stage view's REST API to use this exclusively
          3. Benchmark to see what the performance difference is

          UPDATE: *50% improvement in stage view performance, which should carry through to a large extent anywhere we use flow analysis.*
          New: In most cases we only care about the directly attached actions on flownodes. FlowNode.getAction has been identified as ~25% of runtime for pipeline flow analysis, and it is likely b/c this queries all TransientActionFactories for actions.

          We should:

          1. Add a FlowNode.getAction API version (name TBD) that only iterates through the directly added actions (already cached in-object)
          2. Switch the pipeline-graph-analysis plugin and stage view's REST API to use this exclusively
          3. Benchmark to see what the performance difference is

          UPDATE: *Doubles stage view performance, which should carry through to a large extent anywhere we use flow analysis.*

          Sam Van Oort added a comment -

          Released as workflow-api plugin v 2.5

          Sam Van Oort added a comment - Released as workflow-api plugin v 2.5
          Sam Van Oort made changes -
          Resolution New: Done [ 10000 ]
          Status Original: In Review [ 10005 ] New: Closed [ 6 ]

            svanoort Sam Van Oort
            svanoort Sam Van Oort
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: