mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Fix major performance issue with add_record O(N^2)
Before, 1-2k record took ~10s and more than that was just painful, 5k took forever. This records things to keep a dict of nodes with a set of records so that we can quickly "jump" to the point we're looking for without having to search. 10k records now takes ~5s.
This commit is contained in:
@@ -196,7 +196,8 @@ class TestNs1Provider(TestCase):
|
||||
provider = Ns1Provider('test', 'api-key')
|
||||
|
||||
desired = Zone('unit.tests.', [])
|
||||
desired.records.update(self.expected)
|
||||
for r in self.expected:
|
||||
desired.add_record(r)
|
||||
|
||||
plan = provider.plan(desired)
|
||||
# everything except the root NS
|
||||
|
||||
Reference in New Issue
Block a user