kotborealis commented on code in PR #2172:
URL: https://github.com/apache/buildstream/pull/2172#discussion_r3796521579
##########
src/buildstream/element.py:
##########
@@ -3337,6 +3337,8 @@ def __update_cache_keys(self):
# This code can be run multiple times until the strict key can be
calculated,
# so let's ensure we only ever calculate the weak key once, even
though we need
# to resolve it before we can resolve the strict key.
+ build_dependencies = list(self._dependencies(_Scope.BUILD))
Review Comment:
I agree that caching `_dependencies()` could provide a better optimization,
but for this PR I kept the change deliberately narrow.
A cache would need careful invalidation when dependencies are added through.
I would prefer to handle that broader refactoring separately, with dedicated
tests. The current change only targets the duplicate traversal.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]