mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-11-13 08:50:41 -05: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.
|
||
|---|---|---|
| .. | ||
| caches | ||
| __init__.py | ||
| async.py | ||
| distributor.py | ||
| file_consumer.py | ||
| frozenutils.py | ||
| httpresourcetree.py | ||
| jsonobject.py | ||
| logcontext.py | ||
| logformatter.py | ||
| logutils.py | ||
| manhole.py | ||
| metrics.py | ||
| module_loader.py | ||
| msisdn.py | ||
| ratelimitutils.py | ||
| retryutils.py | ||
| rlimit.py | ||
| stringutils.py | ||
| threepids.py | ||
| versionstring.py | ||
| wheel_timer.py | ||