Optimize _make_firewall_dict_with_rules db queries
This change optimizes _make_firewall_dict_with_rules implementation by
getting rules for a firewall in one db query instead of one db query per
rule (previous implementation). It improves performance: typically on
my deployment _make_firewall_dict_with_rules for a firewall with 1000
rules takes 0.2s instead of 12s with previous implementation.
Change-Id: Ia5cd39ec4ee388fab21884d08e2b19f6f6c484d5
Closes-Bug: #1658817
(cherry picked from commit 8a97921783cc4b7aae2b0c2fd764813fa0aa2821)
Reviewed: https:/ /review. openstack. org/425075 /git.openstack. org/cgit/ openstack/ neutron- fwaas/commit/ ?id=651069db85a 9e793470a5deb19 8b08ed2a76eab2
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit 651069db85a9e79 3470a5deb198b08 ed2a76eab2
Author: Cedric Brandily <email address hidden>
Date: Mon Jan 23 23:37:48 2017 +0100
Optimize _make_firewall_ dict_with_ rules db queries
This change optimizes _make_firewall_ dict_with_ rules implementation by dict_with_ rules for a firewall with 1000
getting rules for a firewall in one db query instead of one db query per
rule (previous implementation). It improves performance: typically on
my deployment _make_firewall_
rules takes 0.2s instead of 12s with previous implementation.
Change-Id: Ia5cd39ec4ee388 fab21884d08e2b1 9f6f6c484d5 aae2b0c2fd76481 3fa0aa2821)
Closes-Bug: #1658817
(cherry picked from commit 8a97921783cc4b7