mirror of https://github.com/ansible/ansible.git
Use list comprehensions for efficiency
For loops can be inefficient, particularly when doing a dot command with them. https://wiki.python.org/moin/PythonSpeed/PerformanceTips#Loops and https://wiki.python.org/moin/PythonSpeed/PerformanceTips#Avoiding_dots... This patch makes use of list comprehensions to be as efficient as possible while still retaining order. Efficiency was lost a bit when switching away from sets() but this gains some of it back.pull/5500/head
parent
191be7b951
commit
23720ff19d
Loading…
Reference in New Issue