diff options
author | Jürg Billeter <j@bitron.ch> | 2019-11-19 21:06:36 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-01-18 10:46:52 +0000 |
commit | a5ee014f03171ec9f9319c6956e0f832cc446188 (patch) | |
tree | 67f926ce359dc7240b75a109e88ba9928b0504e1 /src/buildstream/_artifact.py | |
parent | cdb562771fa2e5554562b0f799197e342d8a927f (diff) | |
download | buildstream-a5ee014f03171ec9f9319c6956e0f832cc446188.tar.gz |
element.py: Optimize assemble_done()
After a successful build we know that the artifact is cached. Avoid
querying buildbox-casd and the filesystem.
Diffstat (limited to 'src/buildstream/_artifact.py')
-rw-r--r-- | src/buildstream/_artifact.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buildstream/_artifact.py b/src/buildstream/_artifact.py index feba3898b..ae1b395b3 100644 --- a/src/buildstream/_artifact.py +++ b/src/buildstream/_artifact.py @@ -459,6 +459,14 @@ class Artifact: def reset_cached(self): self._cached = None + # set_cached() + # + # Mark the artifact as cached without querying the filesystem. + # This is used as optimization when we know the artifact is available. + # + def set_cached(self): + self._cached = True + # _get_proto() # # Returns: |