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

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



#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 iwakeh):

 Replying to [comment:8 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.

 My choice of collection was rather a reflex.  Maybe, I stared at logs and
 heap dumps for too long, but how do you retrieve a particular object
 reference from a Set?

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