Skip to content

Commit 77c2319

Browse files
committed
_stream: speed up bst artifact show
We only need to check the remotes for cached artifacts if we don't have them cached locally.
1 parent ce4ba2f commit 77c2319

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/buildstream/_stream.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,8 +797,10 @@ def artifact_show(self, targets, *, selection=_PipelineSelection.NONE):
797797

798798
self.query_cache(target_objects)
799799

800+
not_cached_locally = [element for element in target_objects if not element._cached()]
801+
800802
if self._artifacts.has_fetch_remotes():
801-
self._resolve_cached_remotely(target_objects)
803+
self._resolve_cached_remotely(not_cached_locally)
802804

803805
return target_objects
804806

0 commit comments

Comments
 (0)