[tor-bugs] #30291 [Core Tor/Tor]: Optimize our path selection code

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Apr 25 19:21:40 UTC 2019


#30291: Optimize our path selection code
-------------------------------------------------+-------------------------
 Reporter:  dgoulet                              |          Owner:  (none)
     Type:  enhancement                          |         Status:  new
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  unspecified
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-performance tor-hs path-         |  Actual Points:
  selection refactoring tor-dos                  |
Parent ID:  #30221                               |         Points:  10
 Reviewer:                                       |        Sponsor:
                                                 |  Sponsor27-can
-------------------------------------------------+-------------------------

Comment (by nickm):

 Another possibility here is to use another data structure besides a
 smartlist in this context.  If we need to be able to remove elements in
 O(1), it might make sense to use a pointer-indexed hashtable, and then to
 switch over to an array only when we're choosing by weighted bandwidth.

 A further issue I see above is that, with the exception of fmonty, the
 other functions you're listing above really ought to be trivial.  Either
 their call overhead is too high and we should inline them, or they're
 doing more than they need to do, or we are calling them waaaay too much.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30291#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list