[tor-bugs] #25103 [Metrics/Library]: Improve webstats performance

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Feb 2 18:50:01 UTC 2018


#25103: Improve webstats performance
-----------------------------+------------------------------
 Reporter:  iwakeh           |          Owner:  metrics-team
     Type:  enhancement      |         Status:  needs_review
 Priority:  Medium           |      Milestone:
Component:  Metrics/Library  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:  #25100           |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+------------------------------

Comment (by karsten):

 Interesting approach. I'd probably have stored the `int` value rather than
 the `T` reference. But I see how your approach should work as well.

 One thing, though: you're never using the `int` value returned by
 `numFromList` other than for immediately looking up the reference in the
 list. Why not use a `HashSet` instead and change `numFromList` to
 `fromSet` that returns the `T` reference directly? Just in case there are
 more than just a few thousand entries in that list. And even with those,
 the set might be faster.

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


More information about the tor-bugs mailing list