mirror of https://github.com/ansible/ansible.git
Improve performance of including tasks into the play (#84445)
* Improve performance of including tasks into the play PlayIterator.add_tasks is used to insert tasks from an include into the play for particular host. It makes a copy of the current block including the tasks within the block and inserts the new tasks from the include into the copied block. But there is no need to make copies of tasks within the block, what we want is a "shallow" copy of the block. This PR changes that to copy the block excluding the tasks within. On a contrived playbook with 50 include_role tasks, each role has 1 task, running on 10 hosts the running time is reduced from ~55s to ~44s in my environment. ci_complete * Add changelogpull/84887/head
parent
5280850130
commit
e66aaa66a5
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- Optimize the way tasks from within ``include_tasks``/``include_role`` are inserted into the play.
|
||||
Loading…
Reference in New Issue