[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #18881 [Core Tor/Stem]: speed up is_match() of stem/exit_policy.py



#18881: speed up is_match() of stem/exit_policy.py
---------------------------+------------------------
 Reporter:  toralf         |          Owner:  atagar
     Type:  defect         |         Status:  new
 Priority:  Medium         |      Milestone:
Component:  Core Tor/Stem  |        Version:
 Severity:  Normal         |     Resolution:
 Keywords:                 |  Actual Points:
Parent ID:                 |         Points:
 Reviewer:                 |        Sponsor:
---------------------------+------------------------

Comment (by atagar):

 Hmmm. Those checks aren't purely input validation. If they were then
 adding a 'bypass validation' argument makes sense for such a performance
 boon. But if you drop this whole block you'll get the wrong answer when
 matching IPv4 exit policies with IPv6 addresses and vice versa (that's
 what most of the code does).

 Per chance do you know what it is in here that's slow? If a single call
 (like is_valid_ipv4_address()) is the bottleneck then improving that might
 be a better route forward.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18881#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs