Commit c4026d7c authored by Petr Špaček's avatar Petr Špaček

fixup! WIP: zone2pickle optimization

parent 73e33871
Pipeline #48150 passed with stage
in 1 minute and 14 seconds
......@@ -15,9 +15,9 @@ def load_nsname2ipset() -> Dict[dns.name.Name, Set[AnIPAddress]]:
logging.info('loading NS name -> IP address mapping')
with open('nsname2ipset.pickle', 'rb') as nsname2ipset_pickle:
nsname2ipset = pickle.load(nsname2ipset_pickle)
ip_all = set.union(*nsname2ipset.values())
ip_cnt = functools.reduce(lambda cnt, ipset: cnt + len(ipset), nsname2ipset.values(), 0)
logging.info('loaded %s unique IP addresses for %s NS names',
len(ip_all), len(nsname2ipset))
ip_cnt, len(nsname2ipset))
return nsname2ipset
def load_domain2ipset() -> Dict[dns.name.Name, Set[AnIPAddress]]:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment