mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-02-25 04:19:47 -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.