mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Use dict to speed up record search
This dict is created earlier, presumably to speed up this exact lookup, but it was using the list form instead, requiring a linear scan for each item.
This commit is contained in:
@@ -585,7 +585,7 @@ class CloudflareProvider(BaseProvider):
|
||||
changed_records = {c.record for c in changes}
|
||||
|
||||
for desired_record in desired.records:
|
||||
if desired_record not in existing.records: # Will be created
|
||||
if desired_record not in existing_records: # Will be created
|
||||
continue
|
||||
elif desired_record in changed_records: # Already being updated
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user