Actions
Bug #34938
closeddon't re-evaluate TemplateInputs on every loop iteration
Description
When iterating over a big list of hosts (with load_hosts().each_record do |host|
or similar), it is rather expensive to call input()
inside the loop, as that hits the database every time.
For example, rendering the Ansible Inventory report with 3500 hosts, hits the DB with 35000 TemplateInput Loads (10× per host!).
Updated by The Foreman Bot over 2 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/9223 added
Updated by Evgeni Golov over 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|28d7b3c3a7c5679112a12b121ee1f8dea25adeb0.
Actions