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

Pipeline builds retain executed script in memory

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Activity

          Hide
          bitwiseman Liam Newman added a comment -

          I'm not sure what would be involved in doing this but it seems like a good idea.

          Show
          bitwiseman Liam Newman added a comment - I'm not sure what would be involved in doing this but it seems like a good idea.

            People

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

              Dates

              Created:
              Updated: