vastly improvee the speed of the access_processor's main process method
by returning dict's instead of lists from IPTools. This turns a very nasty O(n)*3 into O(1)*3 .. much nicer. All tests pass.
This commit is contained in:
parent
bdb59f54ec
commit
9ce73e2e1e
|
@ -24,8 +24,9 @@ try:
|
|||
CIDR_support = True
|
||||
|
||||
def return_ips(conf, conf_tag):
|
||||
return IpRangeList(*[x.strip() for x in
|
||||
conf.get(conf_tag, '').split(',') if x.strip()])
|
||||
return dict((k, 1) for k in
|
||||
IpRangeList(*[x.strip() for x in
|
||||
conf.get(conf_tag, '').split(',') if x.strip()]))
|
||||
def sanitize_ips(line_data):
|
||||
for x in ['lb_ip', 'client_ip', 'log_source']:
|
||||
if line_data[x] == '-':
|
||||
|
|
Loading…
Reference in New Issue