diff options
author | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-02-27 17:55:33 +0000 |
---|---|---|
committer | Benjamin Schubert <ben.c.schubert@gmail.com> | 2019-03-22 12:28:53 +0000 |
commit | 42a41edc8f9a1985f511e8a6c1b90bf6736c4d68 (patch) | |
tree | f9b17c399055e7e556f317ca9162f9664162545a /buildstream/_pipeline.py | |
parent | bdc5ac22225291923f0f366805d6825a9832a80f (diff) | |
download | buildstream-42a41edc8f9a1985f511e8a6c1b90bf6736c4d68.tar.gz |
Rework Element.dependencies to be more efficient
Diffstat (limited to 'buildstream/_pipeline.py')
-rw-r--r-- | buildstream/_pipeline.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/buildstream/_pipeline.py b/buildstream/_pipeline.py index 004776293..5dec9001d 100644 --- a/buildstream/_pipeline.py +++ b/buildstream/_pipeline.py @@ -24,6 +24,8 @@ import itertools from operator import itemgetter from collections import OrderedDict +from pyroaring import BitMap # pylint: disable=no-name-in-module + from ._exceptions import PipelineError from ._message import Message, MessageType from ._profile import Topics, profile_start, profile_end @@ -152,7 +154,7 @@ class Pipeline(): def dependencies(self, targets, scope, *, recurse=True): # Keep track of 'visited' in this scope, so that all targets # share the same context. - visited = {} + visited = (BitMap(), BitMap()) for target in targets: for element in target.dependencies(scope, recurse=recurse, visited=visited): |