From 65db30aa99c4b1619c798dda541436e5bb2f7007 Mon Sep 17 00:00:00 2001 From: Abderrahim Kitouni Date: Sat, 20 Jun 2020 07:45:31 +0100 Subject: element.py: don't use timed activity for staging every artifact Staging now takes very little time, so we have two lines per artifact with no benefit. Use a STATUS line instead. --- src/buildstream/element.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 6a0fa5fab..45c3735fd 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -661,23 +661,21 @@ class Element(Plugin): # Time to use the artifact, check once more that it's there self.__assert_cached() - with self.timed_activity("Staging {}/{}".format(self.name, self._get_brief_display_key())): - # Disable type checking since we can't easily tell mypy that - # `self.__artifact` can't be None at this stage. - files_vdir = self.__artifact.get_files() # type: ignore + self.status("Staging {}/{}".format(self.name, self._get_brief_display_key())) + # Disable type checking since we can't easily tell mypy that + # `self.__artifact` can't be None at this stage. + files_vdir = self.__artifact.get_files() # type: ignore - # Hard link it into the staging area - # - vbasedir = sandbox.get_virtual_directory() - vstagedir = vbasedir if path is None else vbasedir.descend(*path.lstrip(os.sep).split(os.sep), create=True) + # Hard link it into the staging area + # + vbasedir = sandbox.get_virtual_directory() + vstagedir = vbasedir if path is None else vbasedir.descend(*path.lstrip(os.sep).split(os.sep), create=True) - split_filter = self.__split_filter_func(include, exclude, orphans) + split_filter = self.__split_filter_func(include, exclude, orphans) - result = vstagedir.import_files( - files_vdir, filter_callback=split_filter, report_written=True, can_link=True - ) + result = vstagedir.import_files(files_vdir, filter_callback=split_filter, report_written=True, can_link=True) - return result + return result def stage_dependency_artifacts( self, -- cgit v1.2.1