Fix performance regression adding rules to security groups
Sometime between liberty and pike, adding rules to SG's got
slow, and slower with every rule. Streamline the rule create path,
and get close to the old performance back.
Two performance fixes:
1. Get rid of an n^2 duplicate check, using a hash table instead,
on bulk creates. This is more memory intensive than the previous loop,
but usable far past where the other becomes too slow to be useful.
2. Use an object existence check in a few places where we do not
want to load all of the child rules.
Co-Authored-By: William Hager <email address hidden>
Change-Id: I34e41a128f28211f2e7ab814a2611ce22620fcf3
Closes-bug: 1810563
Reviewed: https:/ /review. openstack. org/628691 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=2eb31f84c9a 6c9fc6340819f75 6a7a82cbf395f3
Committed: https:/
Submitter: Zuul
Branch: master
commit 2eb31f84c9a6c9f c6340819f756a7a 82cbf395f3
Author: Doug Wiegley <email address hidden>
Date: Fri Jan 4 14:55:29 2019 -0700
Fix performance regression adding rules to security groups
Sometime between liberty and pike, adding rules to SG's got
slow, and slower with every rule. Streamline the rule create path,
and get close to the old performance back.
Two performance fixes:
1. Get rid of an n^2 duplicate check, using a hash table instead,
on bulk creates. This is more memory intensive than the previous loop,
but usable far past where the other becomes too slow to be useful.
2. Use an object existence check in a few places where we do not
want to load all of the child rules.
Co-Authored-By: William Hager <email address hidden> 1f2e7ab814a2611 ce22620fcf3
Change-Id: I34e41a128f2821
Closes-bug: 1810563