diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2019-04-29 15:35:15 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-04-29 15:35:15 +0000 |
commit | 68c8df44986cf0198f95ceb45b9a248e00f31f32 (patch) | |
tree | 8fd1e16c86b157c26a623db83049fe959ad8651c | |
parent | 73ef730ed9096c6ec418176f3d903d2483262b6b (diff) | |
parent | 7dc2b15ee4170decd56b9eac7da4781493980249 (diff) | |
download | buildstream-68c8df44986cf0198f95ceb45b9a248e00f31f32.tar.gz |
Merge branch 'jonathan/reduce-update-state-calls' into 'master'
Reduce the amount of times we call Element._update_state()
See merge request BuildStream/buildstream!1312
-rw-r--r-- | buildstream/element.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index 05884c008..8cc25fec6 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -1393,7 +1393,6 @@ class Element(Plugin): # def _schedule_tracking(self): self.__tracking_scheduled = True - self._update_state() # _tracking_done(): # @@ -1835,7 +1834,12 @@ class Element(Plugin): def _fetch_done(self): # We are not updating the state recursively here since fetching can # never end up in updating them. - self._update_state() + + # Fetching changes the source state from RESOLVED to CACHED + # Fetching cannot change the source state from INCONSISTENT to CACHED because + # we prevent fetching when it's INCONSISTENT. + # Therefore, only the source state will change. + self.__update_source_state() # _pull_pending() # |