Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 328
    • Issues 328
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 31
    • Merge requests 31
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #23623
Closed
Open
Issue created Sep 22, 2017 by David Goulet@dgoulet🐼Owner

hs: Cache current time period number and SRV start time

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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking