forked-synapse/synapse/util
Richard van der Hoff fa5c2bc082 Reduce set building in get_entities_changed
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.
2018-07-12 11:37:44 +01:00
..
caches Reduce set building in get_entities_changed 2018-07-12 11:37:44 +01:00
__init__.py run isort 2018-07-09 16:09:20 +10:00
async.py run isort 2018-07-09 16:09:20 +10:00
distributor.py Remove preserve_context_over_{fn, deferred} 2017-11-14 11:22:42 +00:00
file_consumer.py run isort 2018-07-09 16:09:20 +10:00
frozenutils.py run isort 2018-07-09 16:09:20 +10:00
httpresourcetree.py run isort 2018-07-09 16:09:20 +10:00
jsonobject.py Handle sending events and device messages over federation 2016-11-17 15:48:04 +00:00
logcontext.py Attempt to include db threads in cpu usage stats (#3496) 2018-07-10 16:12:36 +01:00
logformatter.py run isort 2018-07-09 16:09:20 +10:00
logutils.py run isort 2018-07-09 16:09:20 +10:00
manhole.py run isort 2018-07-09 16:09:20 +10:00
metrics.py Refactor logcontext resource usage tracking (#3501) 2018-07-10 13:56:07 +01:00
module_loader.py pep8 2017-09-26 19:21:41 +01:00
msisdn.py run isort 2018-07-09 16:09:20 +10:00
ratelimitutils.py run isort 2018-07-09 16:09:20 +10:00
retryutils.py run isort 2018-07-09 16:09:20 +10:00
rlimit.py run isort 2018-07-09 16:09:20 +10:00
stringutils.py run isort 2018-07-09 16:09:20 +10:00
threepids.py fix PR nitpicking 2018-01-19 18:23:45 +00:00
versionstring.py run isort 2018-07-09 16:09:20 +10:00
wheel_timer.py Move more xrange to six 2018-04-28 13:57:00 +02:00