[tor-bugs] #23623 [Core Tor/Tor]: hs: Cache current time period number and SRV start time
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Sep 22 20:17:13 UTC 2017
#23623: hs: Cache current time period number and SRV start time
------------------------------+--------------------------------
Reporter: dgoulet | Owner: (none)
Type: enhancement | Status: new
Priority: Medium | Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords: tor-hs, tor-sr
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
------------------------------+--------------------------------
For each node in the consensus, we call `node_set_hsdir_index()` which
gets the time period and srv start time to learn if we are in between TP
and SRV or not.
These calls ultimately call `get_voting_schedule()` which allocates memory
and prints a debug log everytime.
All of this is actually pretty heavy and they are values we can cache
because they are all based on the timings of a new consensus (valid_after,
valid_until, fresh_until).
It is also called every second by a tor with a hidden service.
Caching those and updating when we get a new consensus seems a light
refactoring for a good performance improvement.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23623>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list