Scripts may be large and can be lazy-loaded if needed.
CpsFlowExecution.script/loadedScripts should be stored externally
These can wind up comprising most of the retained size of a CpsFlowExecution for complex builds, but unless reloading a build or using Replay these fields are unused. It would be better to save these to disk (via owner.rootDir) and keep them out of heap.
Reducing the number of times we have to re-persist the build.xml will reduce the impact of this problem on pipeline execution rates - https://issues.jenkins-ci.org/browse/JENKINS-47174