mirror of
https://github.com/element-hq/synapse.git
synced 2025-03-14 03:38:42 +00:00
This line shows up as about 5% of cpu time on a synchrotron: not_known_entities = set(entities) - set(self._entity_to_key) Presumably the problem here is that _entity_to_key can be largeish, and building a set for its keys every time this function is called is slow. Here we rewrite the logic to avoid building so many sets. |
||
---|---|---|
.. | ||
__init__.py | ||
descriptors.py | ||
dictionary_cache.py | ||
expiringcache.py | ||
lrucache.py | ||
response_cache.py | ||
snapshot_cache.py | ||
stream_change_cache.py | ||
treecache.py |