summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildstream/_loader/loader.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buildstream/_loader/loader.py b/src/buildstream/_loader/loader.py
index cdfc1dd56..33ccfb6fe 100644
--- a/src/buildstream/_loader/loader.py
+++ b/src/buildstream/_loader/loader.py
@@ -169,6 +169,11 @@ class Loader():
#
del state['_fetch_subprojects']
+ # Also there's no gain in pickling over the caches, and they might
+ # contain things which are unpleasantly large or unable to pickle.
+ del state['_elements']
+ del state['_meta_elements']
+
return state
# clean_caches()