tor/changes/ticket27247
Nick Mathewson 33a0c619a8 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 e5c608e535.

Fixes bug 27247; bugfix on 0.3.0.1-alpha.
2018-09-07 19:48:56 -04:00

6 lines
327 B
Plaintext

o Minor bugfixes (client, memory usage):
- When not running as a directory cache, there is no need to store the
text of the current consensus networkstatus in RAM. Previously,
however, clients would store this anyway, at a cost of over 5 MB.
Now, they do not. Fixes bug 27247; bugfix on 0.3.0.1-alpha.