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

Re: [tor-bugs] #22210 [Core Tor/Tor]: circuit_is_acceptable is slow due to IP and fingerprint parsing



#22210: circuit_is_acceptable is slow due to IP and fingerprint parsing
--------------------------+------------------------------------
 Reporter:  teor          |          Owner:
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.3.2.x-final
Component:  Core Tor/Tor  |        Version:  Tor: 0.2.8.12
 Severity:  Normal        |     Resolution:
 Keywords:  tor-hs        |  Actual Points:
Parent ID:                |         Points:  1
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------

Comment (by arma):

 Replying to [ticket:22210 teor]:
 > 43.76 s   34.7%       1.30 s             connection_ap_can_use_exit
 > 39.51 s   31.3%       574.00 ms                   node_get_by_nickname
 > 38.93 s   30.9%       764.00 ms                    node_get_by_hex_id

 This case happens because they're hidden service descriptor lookups, so
 they're general (exit) streams yet they have conn->chosen_exit_name set.

 That's a surprising amount of time in hex_digest_nickname_decode(), but I
 guess with all the strlcpy's, etc, that it does, it shouldn't be that
 surprising.

 You're right that it's inefficient here, since the logic is "consider a
 given circuit, and then reparse what exit node this conn says it's for,
 and then see if that circuit ends at that exit node", and in theory we
 don't need to keep reparsing. I would be tempted to try to take a step
 farther back though and figure out if there's a way to call the broader
 "how's it going, are any streams ready to be attached to circuits yet"
 function more sparingly.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22210#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