mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
119cb9bbcf
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. |
||
---|---|---|
.. | ||
engines | ||
schema | ||
util | ||
__init__.py | ||
_base.py | ||
account_data.py | ||
appservice.py | ||
background_updates.py | ||
client_ips.py | ||
deviceinbox.py | ||
devices.py | ||
directory.py | ||
end_to_end_keys.py | ||
event_federation.py | ||
event_push_actions.py | ||
events.py | ||
filtering.py | ||
keys.py | ||
media_repository.py | ||
openid.py | ||
prepare_database.py | ||
presence.py | ||
profile.py | ||
push_rule.py | ||
pusher.py | ||
receipts.py | ||
registration.py | ||
rejections.py | ||
room.py | ||
roommember.py | ||
search.py | ||
signatures.py | ||
state.py | ||
stream.py | ||
tags.py | ||
transactions.py |