synapse-product/synapse/util
Erik Johnston 119cb9bbcf Reduce cache size by not storing deferreds
Currently the cache descriptors store deferreds rather than raw values,
this is a simple way of triggering only one database hit and sharing the
result if two callers attempt to get the same value.

However, there are a few caches that simply store a mapping from string
to string (or int). These caches can have a large number of entries,
under the assumption that each entry is small. However, the size of a
deferred (specifically the size of ObservableDeferred) is signigicantly
larger than that of the raw value, 2kb vs 32b.

This PR therefore changes the cache descriptors to store the raw values
rather than the deferreds.

As a side effect cached storage function now either return a deferred or
the actual value, as the cached list decriptor already does. This is
fine as we always end up just yield'ing on the returned value
eventually, which handles that case correctly.
2017-04-25 10:23:11 +01:00
..
caches Reduce cache size by not storing deferreds 2017-04-25 10:23:11 +01:00
__init__.py Fix time_bound_deferred to throw the right exception 2017-03-23 12:07:11 +00:00
async.py Docs 2017-03-30 17:05:53 +01:00
distributor.py Remove registered_users from the distributor. 2016-06-17 19:14:16 +01:00
frozenutils.py copyrights 2016-01-07 04:26:29 +00:00
httpresourcetree.py Split out create_resource_tree to a separate file 2016-04-22 15:40:51 +01:00
jsonobject.py Handle sending events and device messages over federation 2016-11-17 15:48:04 +00:00
logcontext.py Fix fixme in preserve_fn 2017-04-03 15:38:02 +01:00
logutils.py Fix up logcontexts 2016-02-08 14:26:45 +00:00
manhole.py Add a metrics listener and a ssh listener to the pusher 2016-04-25 17:34:25 +01:00
metrics.py Only abort Measure on Exceptions 2016-08-19 18:23:45 +01:00
msisdn.py Support registration / login with phone number 2017-03-13 17:27:51 +00:00
ratelimitutils.py Remove some unused functions (#711) 2016-04-08 14:01:56 +01:00
retryutils.py Merge pull request #2050 from matrix-org/rav/federation_backoff 2017-03-23 22:27:01 +00:00
rlimit.py Move the versionstring code out of app.homeserver into util 2016-04-11 14:57:09 +01:00
stringutils.py Remove some unused functions (#711) 2016-04-08 14:01:56 +01:00
versionstring.py Add federation /version API 2016-08-05 16:36:07 +01:00
wheel_timer.py Add presence metrics 2016-02-19 09:50:54 +00:00