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

Pipeline builds retain executed script in memory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-cps-plugin
    • None

      A WorkflowRun has a reference to it's CpsFlowExectution which in turn has a reference to the script

      The workflow scripts are not small often > 10KB. with many builds in memory (I have see a heap with tens of thousands of builds loaded) this consumes hundreds of MB.

      As the script is only needed for the replay functionality (at least after the build is complete, and I believe this is the case once the script is compiled) it could be loaded on demand when needed, potentially saving memory and reducing time to load build records just to show status etc.

      Mostly the Run is only held by a weak reference, however this is not always the case and sometimes will be held by a strong reference

            Unassigned Unassigned
            teilo James Nord
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: