aboutsummaryrefslogtreecommitdiff
path: root/src/feature/control
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-07 19:45:01 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-07 19:48:56 -0400
commit33a0c619a8f44cacb400eccc4ab6192d330465c6 (patch)
treeed79c981de43a643ef5065858e221848c4a3f2f8 /src/feature/control
parent95060eacaeae4a32f0c478ca27f81e48d5daee8b (diff)
downloadtor-33a0c619a8f44cacb400eccc4ab6192d330465c6.tar.gz
tor-33a0c619a8f44cacb400eccc4ab6192d330465c6.zip
Do not store cached_dir_t for consensus in RAM if not a dircache.
There are three reasons we use a cached_dir_t to hold a consensus: 1. to serve that consensus to a client 2. to apply a consensus diff to an existing consensus 3. to send the consensus to a controller. But case 1 is dircache-only. Case 2 and case 3 both fall back to networkstatus_read_cached_consensus(). So there's no reason for us to store this as a client. Avoiding this saves about 23% of our RAM usage, according to our experiments last month. This is, semantically, a partial revert of e5c608e535ef9a4c4fe951a2. Fixes bug 27247; bugfix on 0.3.0.1-alpha.
Diffstat (limited to 'src/feature/control')
0 files changed, 0 insertions, 0 deletions