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

Re: [tor-bugs] #25152 [Core Tor/Tor]: Try to call less circuitmux_find_map_entry()



#25152: Try to call less circuitmux_find_map_entry()
-------------------------------------------------+-------------------------
 Reporter:  dgoulet                              |          Owner:  neel
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.5.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  performance, tor-relay,              |  Actual Points:
  034-triage-20180328, 034-removed-20180328      |
Parent ID:                                       |         Points:
 Reviewer:  mikeperry                            |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by nickm):

 I've left a review on the PR; Mike is planning to do so as well.

 In general, I think that the approach is a good start, but that a more
 thorough approach might be called for in order to keep the code clean.
 I'm not sure it's a good idea to proliferate these "hashent" usages
 throughout our codebase, I'd like to take a step back.

 Before we optimize too much we should ask ourselves, "Is this hashtable
 really necessary?"  After all, there are at most two of these hash entries
 for each circuit, and we are looking them up _from_ the circuit. Perhaps a
 better solution would be to give each circuit a couple of pointers to this
 information, to make lookup into an O(1) operation.  Maybe after we were
 done, we might find that the hashtable wasn't necessary at all.

 Of course, we would need to manage lifetime issues carefully here.

 I am not taking a position about whether the change I suggest above should
 be done ''instead of'' or ''after'' this change; I would like a second
 opinion from mike about that -- and ideally from dgoulet too, once he is
 back online.

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