summaryrefslogtreecommitdiffstats
path: root/SCons/Executor.py
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2022-10-19 14:20:50 (GMT)
committerAndrew Morrow <acm@mongodb.com>2022-10-19 14:24:26 (GMT)
commit897ab9da7a09ec3f4705b84ad43485697761c594 (patch)
tree142a9cfc713bce049bd22b2c2966cb778b126030 /SCons/Executor.py
parent32b4cc4932c378845da8891514c497eba86a6697 (diff)
downloadSCons-897ab9da7a09ec3f4705b84ad43485697761c594.zip
SCons-897ab9da7a09ec3f4705b84ad43485697761c594.tar.gz
SCons-897ab9da7a09ec3f4705b84ad43485697761c594.tar.bz2
Obtain a small perf win by using types that iterate faster for children
Diffstat (limited to 'SCons/Executor.py')
-rw-r--r--SCons/Executor.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/SCons/Executor.py b/SCons/Executor.py
index 492ebe3..274af6a 100644
--- a/SCons/Executor.py
+++ b/SCons/Executor.py
@@ -306,30 +306,30 @@ class Executor(object, metaclass=NoSlotsPyPy):
over and over), so removing the duplicates once up front should
save the Taskmaster a lot of work.
"""
- result = SCons.Util.UniqueList([])
+ result = []
for target in self.get_all_targets():
result.extend(target.children())
- return result
+ return SCons.Util.uniquer_hashables(result)
def get_all_prerequisites(self):
"""Returns all unique (order-only) prerequisites for all batches
of this Executor.
"""
- result = SCons.Util.UniqueList([])
+ result = []
for target in self.get_all_targets():
if target.prerequisites is not None:
result.extend(target.prerequisites)
- return result
+ return SCons.Util.uniquer_hashables(result)
def get_action_side_effects(self):
"""Returns all side effects for all batches of this
Executor used by the underlying Action.
"""
- result = SCons.Util.UniqueList([])
+ result = []
for target in self.get_action_targets():
result.extend(target.side_effects)
- return result
+ return SCons.Util.uniquer_hashables(result)
@SCons.Memoize.CountMethodCall
def get_build_env(self):