Don't bother checking for updates if the stream token hasn't advanced for a user

This commit is contained in:
Mark Haines 2015-05-13 13:42:21 +01:00
parent cffe6057fb
commit 63878c0379
12 changed files with 123 additions and 55 deletions

View file

@ -64,6 +64,9 @@ class EventsStore(SQLBaseStore):
except _RollbackButIsFineException:
pass
max_persisted_id = yield self._stream_id_gen.get_max_token(self)
defer.returnValue((stream_ordering, max_persisted_id))
@defer.inlineCallbacks
def get_event(self, event_id, check_redacted=True,
get_prev_content=False, allow_rejected=False,